Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, entirely in your browser.
Related tools
About this tool
Base64 is an encoding scheme that turns arbitrary binary or text data into a string built only from letters, digits, and the characters `+`, `/`, and `=`. It doesn't compress or encrypt anything — it just re-represents data using a character set that's safe to embed in places that weren't designed to carry raw bytes, such as JSON payloads, URLs, email bodies, or HTML attributes. Every 3 bytes of input becomes 4 Base64 characters, which is why encoded output is roughly a third larger than the original.
This tool encodes and decodes entirely on your device using your browser's built-in text and Base64 primitives, with correct UTF-8 handling — so text containing accented characters, non-Latin scripts, or emoji round-trips exactly as expected, not just plain ASCII. Nothing you type is sent to a server, and once the page has loaded, the tool keeps working with no internet connection at all.
In practice, Base64 shows up constantly in web and API development: embedding a small image directly in CSS or HTML as a data URI, packing binary data into a JSON field, encoding credentials for an HTTP Basic Authorization header, attaching files in an email (MIME), or storing binary blobs in text-only fields like environment variables or config files. If a system complains about "invalid characters" when you try to pass binary-ish data through a text channel, Base64 is usually the fix.
It's worth being clear about what Base64 is not: it provides no confidentiality at all. Anyone can decode a Base64 string in seconds, so it should never be used as a substitute for encryption or treated as a way to "hide" sensitive data such as passwords or tokens. Use it purely as a transport-safe encoding, and rely on real cryptography (TLS, encrypted storage, signed tokens) whenever secrecy actually matters.
Switch between the Encode and Decode modes with the toggle at the top, and the tool will validate Base64 input on decode, flagging anything that isn't a well-formed Base64 string instead of silently producing garbage. Once you have a result, copy it directly or use the “Send to” button to pass it straight into another tool in this toolbox — useful, for example, when you want to check the decoded text's length or hash it.
Frequently asked questions
Is Base64 encryption? expand_more
No. Base64 is just a way to represent data using a text-safe character set — it provides zero confidentiality and can be decoded instantly by anyone. Never use it to hide secrets; use real encryption for that.
Why does Base64 output look longer than the input? expand_more
Base64 encodes every 3 bytes of input as 4 output characters, so encoded text is roughly 33% larger than the original data.
Does this tool handle emoji and non-English text correctly? expand_more
Yes. Encoding and decoding are UTF-8 aware, so accented letters, non-Latin scripts, and emoji round-trip correctly rather than being corrupted or mangled.
What are common real-world uses of Base64? expand_more
Embedding small images as data URIs in CSS/HTML, packing binary data into JSON, encoding HTTP Basic Auth credentials, MIME email attachments, and storing binary blobs in text-only fields like environment variables.
Does my data leave my browser? expand_more
No. Encoding and decoding happen entirely on your device, and the tool keeps working offline once the page has loaded.