Base64 Encoder & Decoder
Convert text to Base64 or decode Base64 back to plain text, with full Unicode support, entirely in your browser.
✔ 100% Free✔ No Signup✔ No Watermark✔ Unlimited Use
Encode and Decode Base64, With Full Unicode Support
Base64 is a way of representing binary data or text as plain ASCII letters, numbers and a couple of symbols. It's used everywhere: data URIs, email attachments, API tokens, JSON payloads and config files. This free Base64 encoder and decoder converts either direction instantly.
Unlike the raw btoa() function (which breaks on emoji and accented characters), this tool handles full UTF-8 correctly, so "café ☕" encodes and decodes back perfectly, not into garbled text.
How to Use the Base64 Encoder / Decoder
- 1Paste your text or Base64 string into the box.
- 2Click Encode to Base64 to convert plain text → Base64.
- 3Or click Decode from Base64 to convert Base64 → plain text.
- 4Copy the result, or click Use as Input to chain another conversion.
Why Use MakeToolz's Base64 Encoder / Decoder?
Full UTF-8
Emoji, accents and non-Latin scripts encode and decode correctly, no mojibake.
Both directions
Encode and decode in one tool, with a "use as input" button to chain them.
Whitespace tolerant
Pasted Base64 with line breaks or spaces still decodes cleanly.
Clear errors
Invalid Base64 gives a helpful message instead of a cryptic failure.
Private
Runs entirely in your browser, never send tokens or secrets to a third-party server again.
Free
No limits, no signup.
What Base64 Really Is: Binary-to-Text Encoding
Base64 is a binary-to-text encoding, a way to represent any data using only 64 safe characters: the letters A to Z and a to z, the digits 0 to 9, plus the symbols + and /. It works by taking three bytes of input (24 bits) and rewriting them as four printable characters. That is why Base64 output is always about a third larger than the original. The point is not to hide data or shrink it, but to move binary content safely through channels that only accept plain text, such as email bodies, JSON fields, and URLs. This tool encodes and decodes either direction with full UTF-8 support.
Who Uses Base64, and When
Developers reach for Base64 constantly. It embeds small images and fonts directly into CSS or HTML as data URIs, so a file loads without a separate request. It carries binary attachments inside email, which historically could only send text, using the MIME standard. It packs credentials into HTTP Basic Auth headers, and it wraps tokens, certificates, and small binary blobs so they survive travel through APIs and config files. Anyone debugging a JWT, a data URI, or an API response has likely needed to decode a Base64 string to read what is inside, which is exactly what this tool does instantly and privately.
How Encoding and Decoding Work
To encode, the tool first turns your text into UTF-8 bytes, then maps every three bytes to four Base64 characters, adding one or two = signs of padding at the end if the length is not a multiple of three. To decode, it reverses the process and converts the bytes back into readable text. Plain browser functions choke on emoji and accents because they assume old Latin-1 data, so this tool wraps them with proper UTF-8 handling. That means "cafe with a coffee emoji" survives the round trip intact instead of turning into garbled characters.
Base64 Encoding Examples
| Input text | Base64 output | Note |
|---|---|---|
| Hi | SGk= | One = pad, input length 2 |
| Man | TWFu | No padding, length divisible by 3 |
| Sure. | U3VyZS4= | One = pad |
| a | YQ== | Two = pad, single byte |
Base64 and Data URIs
A data URI lets you paste a file's contents straight into a web page instead of linking to it. It looks like data:image/png;base64, followed by the Base64 of the image bytes. The MIME type (here image/png) tells the browser what kind of data follows, and the base64 marker says how it is encoded. This is handy for tiny icons and inline SVGs because it removes a network request, but it is a poor fit for large files, since Base64 inflates them by a third and they cannot be cached separately. To measure that size increase, run the encoded string through the text size calculator.
Benefits, Limits, and a Security Warning
Base64's benefits are portability and simplicity: it makes binary data safe for text-only systems and is reversible by anyone. Its limits are the 33% size overhead and the fact that it is not compression. The most important warning is that Base64 is not encryption. Anyone can decode it in one click, including this tool, so it offers zero protection for passwords or secrets. Use real encryption for anything sensitive. For related conversions, the URL encoder and decoder handles data meant for links, which follows different rules than Base64.
Common Mistakes and Tips
The most common decode failure is missing or wrong padding, the trailing = signs. If someone stripped them, decoding may fail or truncate. A related trip-up is URL-safe Base64, a variant that swaps + and / for - and _ so the string survives inside a URL; standard decoders may reject it. Tip: paste Base64 with line breaks freely, since this tool ignores whitespace before decoding. Tip: if your decoded text looks like scrambled symbols, the source was probably not UTF-8 text at all but raw binary like an image, which will not display as readable characters.
People Also Ask
Is Base64 the same as encryption?
No. Base64 is encoding, which anyone can reverse instantly with no key. Encryption scrambles data so only someone with the key can read it. Never use Base64 to protect passwords, tokens, or private data.
Why is Base64 output larger than the original?
Base64 turns every three bytes into four characters, so the output is about 33% bigger. That size cost is the trade-off for making binary data safe to send through text-only systems like email and JSON.
What is a data URI?
A data URI embeds a file's contents directly in a web page using a prefix like data:image/png;base64, followed by the Base64 data. It removes a separate download request, which suits tiny images but wastes space on large ones.
What do the equals signs at the end of Base64 mean?
They are padding. Base64 works in groups of three bytes, and when the input does not divide evenly, one or two = signs fill the last group so decoders know where the real data ends.
Why does my emoji break when I decode Base64?
Basic browser decoders assume old Latin-1 data and mangle multi-byte characters. This tool adds proper UTF-8 handling, so emoji and accented letters encode and decode correctly instead of turning into garbled text.
What is the difference between standard and URL-safe Base64?
Standard Base64 uses + and / characters, which have special meaning inside URLs. URL-safe Base64 replaces them with - and _ so the string can sit in a link or filename without being re-encoded.
Can I decode Base64 back to a file?
This tool decodes Base64 to text. If the original was a binary file such as an image, the decoded output will be raw bytes shown as unreadable characters, not a viewable file, because a text box cannot reconstruct the file itself.
Frequently Asked Questions
What is Base64 used for?
Is Base64 encryption?
Why does my emoji break in other Base64 tools?
Is my data safe here?
Related Free Tools
More Encoders & Converters
URL Encoder / DecoderHTML Encoder / DecoderText to Markdown ConverterHEX to RGB ConverterNumber Base ConverterRoman Numeral ConverterMilitary Time ConverterWords to Numbers