Base64 Encoder

Paste text or data to encode it as base64. Want to decode a Base64 string instead?


What is Base64?

Base64 is a text encoding scheme that represents binary data in ASCII string format. It uses 64 printable characters to make binary data safe for text-only systems, APIs, email, JSON payloads, and HTML or CSS data URLs.

Common Use Cases

Base64 encoding is used for embedding small images, encoding authentication credentials in HTTP headers, transmitting attachments through text protocols, and storing binary content in text-based data formats.

Data URL Format

Data URLs follow data:[mediatype];base64,[encoded-data]. The base64 output from this encoder can be combined with a MIME type to create complete inline image or file references.

Why Use Base64?

Base64 is universally supported and reversible without data loss. It increases size by roughly 33%, so it is best for small files, tokens, snippets, and assets where text compatibility matters more than raw size.

How the Encoder Works

Text entered above is converted immediately in your browser using JavaScript. The page also creates a share URL when the input is short enough to fit comfortably in a browser URL.

Security Considerations

Base64 is not encryption. Do not use it to protect secrets, credentials, private files, or tokens unless the surrounding transport and storage are properly secured.