Base64 Encoder & Decoder Utility
Encode text to Base64 or decode it back to plain text instantly, with one-click copy.
Interactive Client Prototype Sandbox
Disclaimer: This free tool is provided “as is,” without warranties of any kind, and is for general informational purposes only — not professional, legal, financial, medical, tax, or engineering advice. Results may contain errors; verify anything important independently and use at your own risk. We accept no liability for any loss or damage arising from its use. See our Terms of Use for details.
Step-by-Step Guide
Paste text in the left box to encode it to Base64, or paste Base64 in the right box to decode it back to plain text — it converts live in both directions, with a copy button on each side. Everything runs in your browser.
Input 'Hello' ➔ Encode ➔ 'SGVsbG8=' — and back again, with nothing sent to a server.
Who it's for
Systems administrators, database operators, network engineers, and web programmers.
Core Features
- Encode and decode in one view — edit either side and the other updates live.
- Full UTF-8 support, so emoji and accented characters round-trip correctly.
- A copy button on each side and clear errors on invalid Base64.
- Runs entirely in your browser — nothing you enter is sent to a server.
🛡️ No tracking — your inputs, keys, and details never leave this client sandbox.
What is Base64 encoding used for?
Base64 turns arbitrary text or binary into a safe ASCII string, so data can travel through systems that only handle plain text — embedding small assets in CSS or HTML, encoding tokens, or putting values in JSON and URLs. It's an encoding, not encryption: anyone can decode it back.
How do I encode or decode Base64?
Type or paste plain text in the left box to see its Base64 on the right, or paste Base64 on the right to decode it back to text on the left. It converts live as you type, both directions, with a copy button on each side.
Does it handle emoji and non-English characters?
Yes. Text is treated as UTF-8 before encoding, so accented letters, emoji, and other Unicode characters round-trip correctly rather than breaking the way a naive Base64 would.
Is my data sent anywhere?
No. Encoding and decoding happen entirely in your browser, so you can safely convert tokens or private text. Invalid Base64 is flagged rather than producing garbage.
What is the difference between standard Base64 and Base64URL?
Standard Base64 uses the characters A–Z, a–z, 0–9, +, and /, with = padding at the end. The + and / characters are not URL-safe, so Base64URL substitutes - for + and _ for /, and typically omits padding. JWTs and many modern APIs use Base64URL. This tool encodes and decodes standard Base64 (with padding); if you need Base64URL decoding, substitute - back to + and _ back to / before pasting.
Can I encode binary files or images to Base64?
This tool encodes text (strings of characters) to Base64 using UTF-8 encoding. For encoding binary files like images or PDFs, you would need a tool that accepts file uploads and reads raw bytes. The use case for text-to-Base64 is encoding text payloads for HTTP headers, embedding small SVGs in CSS as data URIs, or encoding credential strings for Basic authentication.
Why does 'Hello' become 'SGVsbG8=' ?
If you paste the word 'Hello' into a Base64 encoder, you get back 'SGVsbG8=' — a longer, stranger string with an equals sign at the end. Why does a five-letter word expand into eight characters, and what does the equals sign mean? The answer reveals the entire design intent of Base64: it is not a compression scheme or a cipher — it is a translation layer designed to make arbitrary binary data safe to transmit through systems that were built for plain text only.
How the encoding works
The Base64 algorithm takes three bytes of input (24 bits) and produces four output characters (each representing 6 bits). It uses 64 distinct printable ASCII characters — A–Z, a–z, 0–9, plus + and / — so each output character carries exactly 6 bits of information (2^6 = 64). If the input length is not a multiple of three bytes, one or two = padding characters are added at the end to signal how many real data bytes are in the last group. The net result is that Base64-encoded output is always about 33% larger than the input — 3 input bytes become 4 output characters. 'Hello' is 5 bytes; it encodes as 8 characters ('SGVsbG8=').
Why Base64 is not encryption
Base64 is an encoding, not encryption. It is entirely reversible without any key, and any Base64 string can be decoded by anyone who has it. Its purpose is not to hide data but to make arbitrary bytes representable as safe ASCII text so they can travel through systems that only handle printable characters — email (MIME), HTTP headers, JSON fields, and URLs. Authentication credentials sent as 'Basic dXNlcjpwYXNz' in an HTTP header are Base64-encoded, which means they are trivially readable by anyone who intercepts the header unless the connection is encrypted with TLS.
Common uses in web development
Base64 appears frequently in web development: HTTP Basic Authentication encodes 'username:password' as Base64 in the Authorization header. Data URI schemes embed images directly in HTML or CSS as 'data:image/png;base64,...'. MIME email attachments are Base64-encoded so binary files can travel through mail servers that historically only handled ASCII. JWTs use Base64URL (a URL-safe variant with - and _ replacing + and /) to encode the header and payload. Many APIs return binary data (encryption keys, image thumbnails) as Base64 in JSON responses because JSON cannot represent raw binary values.