About Base64 Encode / Decode
Encoding inflates size by roughly a third — every three bytes become four characters — which is why an image inlined as a data URI always weighs more than the file it came from. Worth knowing before embedding anything large in CSS or JSON.
A fast, ad-light Base64 encoder and decoder for both text and files — a clean alternative to base64decode.org. Everything is processed in your browser, so nothing is uploaded.
Base64 is an encoding scheme that represents binary data using a 64-character ASCII alphabet, making it safe to embed inside text-based formats such as JSON payloads, data URLs, HTML, CSS and email (MIME) attachments. This converter lets you encode plain text or whole files into Base64 and decode Base64 back into its original form, in either direction, the moment you paste or drop your input.
It is the quick way to build a data URI for an image, inspect an encoded webhook payload, or move binary data through a channel that only accepts text. Base64 is an encoding rather than encryption — anyone can decode it, so on its own it protects nothing.
Two variants trip people up more than the concept does. Standard Base64 uses the characters plus and slash, both of which carry reserved meanings inside a URL, so tokens and identifiers use Base64URL with hyphen and underscore substituted. Padding is the other: trailing equals signs are mandatory in some implementations and optional in others, which is why a value that decodes cleanly in one language errors in another. If a decode fails on input you believe is valid, the variant is the first thing to check.
It is worth being precise about what Base64 is for, because the misuse is common enough to be a recognised security finding. It exists to move bytes through channels that only accept text, and it requires no key to reverse. Credentials Base64-encoded in a configuration file or a repository are stored in plain text with an extra step, and scanners treat them exactly that way — as a leak rather than a protection.
The size cost has a practical threshold. Inlining a small icon as a data URI saves an HTTP request and is usually a net win; inlining a photograph adds a third to an already large file and blocks the stylesheet or document carrying it from rendering until the whole thing has downloaded. The rough rule most teams settle on is a few kilobytes — below that, inline; above it, let the browser fetch the file separately and cache it.
Common use cases
- Decoding a Base64 payload from an API response or webhook
- Reading an encoded value out of a config file or token
- Converting a data URL back into its original content