📝 Encoding Tool

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings instantly. Supports UTF-8, URL-safe mode, and file encoding. 100% client-side processing.

URL-Safe Mode

                    

                    

📁

Click or drag file here

Images, PDFs, any file type

What Is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a set of 64 ASCII characters (A-Z, a-z, 0-9, +, /). It's widely used in email attachments (MIME), embedding images in HTML/CSS (Data URIs), storing complex data in JSON/XML, and API authentication (Basic Auth headers).

How Base64 Encoding Works

Base64 encoding takes 3 bytes (24 bits) of binary data and splits them into 4 groups of 6 bits each. Each 6-bit group maps to one of 64 characters. If the input isn't a multiple of 3 bytes, padding (=) is added. This means Base64 encoded data is approximately 33% larger than the original.

URL-Safe Base64

Standard Base64 uses + and / characters which have special meaning in URLs. URL-safe Base64 replaces + with - and / with _, making it safe for use in URL parameters and filenames without additional encoding.

Common Use Cases

FAQ

Is Base64 encryption?

No. Base64 is encoding, not encryption. It provides no security — anyone can decode Base64 text. Never use Base64 to protect sensitive data. Use proper encryption (like AES) instead.

Why is Base64 output larger than input?

Base64 converts 3 bytes into 4 characters, resulting in approximately 33% size increase. This is the trade-off for being able to represent binary data as safe ASCII text.

What is the maximum size Base64 can handle?

There's no theoretical limit, but browsers may struggle with very large strings (100MB+). For large files, consider streaming encoding or server-side processing.