Base64 Encoder Decoder
Encode plain text to Base64 or decode Base64 back to readable text instantly.
Switch between encode and decode mode to convert content instantly. Everything happens locally, so you can test examples quickly and keep sensitive text in your browser.
Output
Recent history
Saved conversions will appear here.
What a Base64 encoder and decoder is good for
Base64 is a simple way to represent text or binary-related content using plain ASCII characters. It appears in many practical places: data URIs, API payloads, authentication examples, email content, embedded assets, and quick development experiments. Even if you understand the concept, it is still helpful to have a fast tool that converts data in either direction without sending anything to a server or opening a larger utility suite.
This page supports both encoding and decoding directly in local JavaScript. You can paste regular text to create Base64 output, or paste Base64 to get readable text back. The output updates immediately, which makes the tool useful for debugging, documentation, classroom examples, and developer workflows where speed matters. It is intentionally honest and lightweight: no hidden steps, no false urgency, and no confusing controls.
Tips for reliable Base64 conversions
One common source of confusion is character encoding. Basic browser functions can struggle with Unicode text if they are used carelessly. This tool handles that more safely by converting through bytes first, which makes it a better fit for names, symbols, and multilingual content. If a decode operation fails, it often means the input is incomplete or includes characters that are not valid Base64.
The history section is useful when you are checking several strings in one session or moving between encoded and decoded versions during testing. For best results, keep each conversion focused on one clear piece of content and save the ones you need to revisit. This tool exists to provide straightforward educational value and practical day-to-day help, especially when you need quick feedback without relying on an external site.
Encode and decode Base64 text in your browser
This Base64 encoder and decoder converts plain text to Base64 and turns Base64 back into readable text. The output updates as you type, so you can check an API payload, a config value or an encoded header in seconds. It handles Unicode text correctly, including accents, symbols, emoji and non-Latin scripts, because it works through UTF-8 bytes.
How to use it
- Choose Encode to Base64 or Decode Base64.
- Type or paste your text into the input box on the left.
- Read the result in the Output box. It changes instantly with every edit.
- Click Copy output to copy it, or Save to history to keep it for later.
- Click any item in Recent history to load that input and mode again.
How it works
Base64 represents bytes using 64 safe ASCII characters: A–Z, a–z, 0–9, + and /, with = as padding. Every 3 bytes of input become 4 characters, so encoded text is about a third longer than the original.
When encoding, the tool first turns your text into UTF-8 bytes with the browser's TextEncoder, then encodes those bytes with btoa. When decoding, it reverses the steps: atob turns Base64 into bytes and TextDecoder reads them as UTF-8. This avoids the common error you get when passing non-English text straight to btoa.
All conversion happens in JavaScript on the page. Your text is not uploaded. Saved items stay in your browser's local storage, and the history keeps the 10 most recent entries.
Example
| Text | Base64 |
|---|---|
| Hello | SGVsbG8= |
| café | Y2Fmw6k= |
Tips
- If you see "cannot be decoded as valid Base64 text", the input has characters outside the standard Base64 alphabet or is cut off.
- URL-safe Base64 uses
-and_. Replace them with+and/before decoding here. - This tool works with text. To turn a file into Base64, use File to Base64 Encoder. To save a Base64 string as a file, use Base64 to File Decoder.
Frequently asked questions
Is Base64 a form of encryption?
No. Base64 is an encoding, not encryption. Anyone can decode it without a key, so never use it to hide passwords or secrets.
Why does my decoded text look garbled?
The tool reads decoded bytes as UTF-8 text. If the Base64 holds an image, PDF or other binary data, the result will not be readable. Use the Base64 to File Decoder for that.
Does it support emoji and other languages?
Yes. Text is converted through UTF-8, so emoji, Arabic, Chinese, Cyrillic and accented letters encode and decode correctly.
Related Developer Tools
Browse all tools from the same category.
Domain Authority Checker
Check Moz authority, page authority, spam score, and backlink metrics
Open toolSEO Audit Tool
Audit a website URL for technical SEO, metadata, headings, broken internal links, hreflang, canonical and X-Robots-Tag checks, with report exports
Open toolShowing 1-2 of 48