Base64 Encoder / Decoder

Encode and decode Base64 strings instantly.

Instant Encoding

Convert plain text to Base64 format instantly for use in data URLs, APIs, or email attachments.

Quick Decoding

Decode Base64 strings back to readable text with a single click. Perfect for inspecting encoded payloads.

Privacy Guaranteed

All conversion happens in your browser. Your data never leaves your device or gets uploaded to any server.

Error Detection

Invalid Base64 strings are detected automatically with clear error messages to help you fix encoding issues.

Understanding Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's widely used to transmit data over media designed to handle text, such as email attachments, data URLs in HTML/CSS, and API authentication tokens. Base64 ensures that binary data remains intact across systems that might otherwise corrupt it.

When to Use Base64

Base64 encoding is essential for embedding images directly in HTML (data:image/png;base64,...), transmitting files via JSON APIs, encoding authentication credentials for HTTP Basic Auth, and safely including binary data in XML or JSON. It's also commonly used in JWT tokens and OAuth flows. While Base64 increases data size by approximately 33%, it's the standard solution for text-safe binary transmission.

How Base64 Encoding Works

Base64 converts binary data into groups of 6 bits, then maps each group to one of 64 ASCII characters (A-Za-z0-9+/). Every 3 bytes of input data produces 4 bytes of Base64 output. Padding characters (=) are added to ensure the output length is a multiple of 4. This process is completely reversible—decoding simply reverses the character mapping and removes padding to restore the original binary data.

Base64 FAQ