Base64 Encode / Decode
Convert text to and from Base64 instantly, with full Unicode support — all in your browser.
About the Base64 Encode / Decode
The Base64 Encode / Decode tool is a two-way converter that turns plain text into Base64 and Base64 back into readable text. Flip a single toggle to switch direction, and the result updates live as you type or paste. Everything runs directly in your browser — nothing is uploaded, stored, or logged — so you can safely convert tokens, snippets, and configuration values without them ever leaving your device.
Base64 is one of the most common ways to move data through systems that only handle text. It shows up in email attachments, data URIs, JSON Web Tokens, API keys, HTML and CSS, and countless config files. Whenever binary or non-ASCII content needs to travel over a text-only channel, Base64 is usually the encoding doing the work. This tool handles full Unicode correctly, so emoji, accented letters, and non-Latin scripts round-trip cleanly instead of turning into garbled characters.
How to use
- Pick a direction. Use the Encode and Decode buttons at the top to choose whether you're converting plain text into Base64 or Base64 back into text.
- Enter your text. Type or paste into the input box. The output updates on every keystroke — there's no button to press.
- Read the result. The read-only output box shows the converted value. When decoding, any leading or trailing whitespace around the Base64 is ignored automatically.
- Copy, swap, or clear. Use Copy result to put the output on your clipboard, Swap to move the output into the input and flip the mode (handy for verifying a round-trip), and Clear to empty both boxes and start over.
What Base64 is and when to use it
Base64 represents data using 64 printable ASCII characters (A–Z, a–z, 0–9, +, and /), with = used for padding. Because every value maps to safe, plain-text characters, Base64-encoded data survives transport through systems that would mangle raw bytes. The trade-off is size: Base64 output is about 33% larger than the original, since it packs 3 bytes of input into 4 characters of output.
Reach for Base64 when you need to embed an image in a data URI, inline a small font or asset in CSS, send binary data inside a JSON payload, store a value in an environment variable, or read the segments of a JWT. It's important to know that Base64 is not encryption — it's an encoding, and anyone can decode it. Never treat Base64 as a way to hide secrets; use it only to make data safe to transport, not private.
Frequently asked questions
Does my text get uploaded anywhere?
No. All encoding and decoding happens locally in your browser using JavaScript. Your input is never sent to a server, saved, or logged. Close the tab and everything you entered is gone.
Does it handle emoji and non-English characters?
Yes. The tool encodes text as UTF-8 before converting, so emoji, accented letters, and scripts like Chinese, Arabic, or Cyrillic all encode and decode correctly. A naive Base64 tool would corrupt these; this one round-trips them exactly.
Why do I get an error when decoding?
Decoding fails when the input isn't valid Base64 — for example, it contains characters outside the Base64 alphabet or has broken padding. Check for stray spaces, quotation marks, or missing = signs at the end. When the input is invalid, the tool shows a short message and leaves the output empty rather than crashing.
Is Base64 the same as encryption?
No. Base64 is a reversible encoding, not a cipher. Anyone can paste your Base64 into a decoder and read the original content. Use it to transport data safely, never to protect secrets — for that you need real encryption.
What is the "Swap" button for?
Swap moves the current output into the input box and flips the mode. If you just encoded some text, one click decodes it straight back, which is a quick way to confirm a value round-trips cleanly. It also lets you chain conversions without copying and pasting by hand.
Is there a size limit on what I can convert?
There's no hard limit. Since everything runs in your browser, you can convert anything from a single word to large blocks of text. Extremely large inputs may briefly pause the page while converting, but nothing is truncated or capped.