Base64 Encode & Decode - Free, Local
Encode text to Base64 or decode a Base64 string back to text, entirely in your browser. Handles full Unicode text correctly, not just plain ASCII.
Maintained by Hirantha Sandaruwan Lakshan. Updated 31 July 2026.
How it works
Base64 represents binary data using 64 printable characters, which is why it's commonly used to embed binary-ish content, like an image or a token, inside text formats such as JSON or a URL.
Text is first converted to UTF-8 bytes before encoding, and decoded bytes are interpreted back as UTF-8, so accented letters, emoji, and other non-ASCII characters round-trip correctly rather than becoming garbled.
Decoding a string that isn't valid Base64 fails with a clear message rather than silently returning corrupted output.
Worked examples
Decoding a Base64 token from an API
Paste a Base64 string from an API response or config value to see its decoded contents.
Embedding a small snippet of text as Base64
Encode a short piece of text to paste into a context that expects Base64, like a Basic Auth header or a data URI.
Checking what an unfamiliar Base64 string contains
Paste any Base64-looking string to see whether it decodes to readable text.
Frequently asked questions
Is my text uploaded anywhere?
No, encoding and decoding both happen entirely in your browser tab.
Does this handle emoji and accented characters?
Yes - text is encoded as UTF-8 before Base64 conversion, so non-ASCII characters decode back correctly.
What happens if I paste invalid Base64 to decode?
A clear error is shown rather than silently returning garbled or empty output.
Is Base64 the same as encryption?
No - Base64 is just a reversible text encoding with no secret key, not a way to protect data. Anyone can decode it.
Why does Base64 make my data bigger?
It represents every 3 bytes as 4 text characters, so the output is about 33% larger. That's the cost of making binary data safe to put in text-only places.
What is URL-safe Base64?
A variant that swaps the + and / characters for - and _, so the result can go in a URL without being percent-encoded again. JWTs use it.
Can I Base64 encode an image or file?
This tool handles text. Encoding a file is the same idea, but it's usually done as a data URI in code rather than by hand.
Why does my Base64 string end in equals signs?
Padding. Base64 works in blocks of three bytes, and = marks where the final block was short. It carries no data.
Sources & references
Updated Jul 31, 2026