Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 strings instantly in your browser. Free, private, no data uploaded.


What is Base64 Encoding?

Base64 is a binary-to-text encoding scheme that converts binary data into a sequence of printable ASCII characters. It's widely used in web development to embed images in CSS/HTML, encode authentication tokens (JWT), transmit binary data in JSON/XML, and encode email attachments (MIME).

Common Use Cases

JWT

Decode JSON Web Tokens to inspect their payload without external tools. The header and payload sections are Base64URL-encoded.

Data URI

Encode small images or fonts as Base64 data URIs to embed directly in HTML/CSS, reducing HTTP requests.

API Auth

HTTP Basic Authentication encodes username:password as Base64. Decode incoming auth headers for debugging.

MIME

Email attachments are encoded in Base64. Decode them to inspect raw content without an email client.

Frequently Asked Questions

Is Base64 encoding the same as encryption?

No. Base64 is an encoding, not encryption. It provides zero security — anyone can decode it. It's designed for safe data transport, not for hiding information.

Why does Base64 make data ~33% larger?

Base64 represents 3 bytes of binary data as 4 ASCII characters. This 3:4 ratio means the output is always approximately 33% larger than the input.

What's the difference between Base64 and Base64URL?

Base64URL replaces '+' with '-' and '/' with '_', making it safe for use in URLs and filenames. JWT tokens use Base64URL encoding.

Is my data safe using this tool?

Yes. All encoding and decoding happens entirely in your browser using JavaScript's built-in btoa() and atob() functions. No data is sent to any server.