HandleKit
Tools About Blog Research Contact

Base64 Encoder & Decoder

Safely convert binary data and text to Base64 format with 100% privacy.

Common Use Cases

Embed images in HTML/CSS
HTTP Basic Auth headers
JWT token payloads
Email attachments (MIME)
API binary data transfer
Data URI schemes

What is Base64?

Base64 is a binary-to-text encoding scheme that represents data as a string of 64 printable ASCII characters. It is primarily used to transmit binary data over systems that are designed to handle text, such as embedding images in HTML or sending email attachments.

How it Works

Base64 works by taking groups of 24 bits (3 bytes) and mapping them into four 6-bit values. Each 6-bit value then corresponds to a character in the Base64 alphabet (A-Z, a-z, 0-9, +, /).

Resulting data is ~33% larger than the original but safe for text-based transport.

Not Encryption

A common security pitfall is assuming Base64 protects your data. It does not. Base64 is an encoding, not encryption.

Anyone with a simple decoder can reveal the original content. Never use Base64 to store or transmit sensitive data without secondary encryption.

Frequently Asked Questions

Why do Base64 strings end in "=="?

The equal sign (`=`) is used as padding. Since Base64 processes data in 24-bit chunks, if the source data isn't a multiple of 3 bytes, padding is added to ensure the output length is a multiple of 4 characters.

Is my file size limited for Base64 encoding?

HandleKit processes files entirely on your device. While there's no hard limit, very large files (50MB+) may slow down your browser tab. For web assets like small images or favicons, it's near-instant.

When should I use Data URIs?

Data URIs (Base64 strings used as a `src`) are perfect for tiny icons or decorative elements that you want to bundle directly into your HTML or CSS to reduce the number of HTTP requests.

Working with JSON?

Switch to our JSON Formatter to prettify or minify your code with instant syntax highlighting.

Launch JSON Tool

How useful was this tool?

Your feedback helps us improve HandleKit.