Base64 Encoder & Decoder
Encode text to standard Base64 or decode standard Base64 back to text, with full UTF-8 support. Runs entirely in your browser — nothing is uploaded.
How to use this tool
- 1
Click Encode to turn text into Base64, or Decode to turn Base64 back into text.
- 2
Type or paste your input into the text box (it starts with a sample value you can replace).
- 3
Press Run to process the input; the result appears in the box below.
- 4
If decoding fails, check the error message — invalid Base64 characters or wrong padding are the usual causes.
What is Base64 and why is it everywhere?
Base64 is an encoding scheme — not encryption — that represents binary data using 64 printable ASCII characters: A-Z, a-z, 0-9, plus + and /, with = used for padding. It exists because many channels are text-only or treat certain bytes specially: SMTP email was designed for 7-bit ASCII, JSON cannot hold raw bytes, URLs reserve some characters, and HTTP headers are line-oriented text. Base64 carries binary safely through all of them. The mechanics: input bytes are grouped in threes (24 bits) and each group becomes four Base64 characters of 6 bits each, so output is always about 33% larger than input. This tool works on text. When encoding, it first converts your text to UTF-8 bytes (via encodeURIComponent) and then applies the browser's btoa, so emoji and non-Latin scripts survive correctly — something a naive btoa(text) call would crash on. Decoding reverses that with atob followed by a UTF-8 decode. It produces and accepts the standard alphabet with + and / only; it does not handle the URL-safe variant (- and _), and atob will reject input that contains those characters.
Common use cases
Encode a username:password pair to build an HTTP Authorization: Basic header value by hand.
Decode the header or payload segment of a JWT to read its JSON claims while debugging auth.
Encode a short UTF-8 string (including emoji or accented text) to paste into a JSON field or YAML config.
Decode a Base64 string from an API response, webhook, or log line to see the original text.
Wrap a small text snippet so it survives copy/paste through systems that mangle special characters.
Sanity-check that a Base64 value round-trips by encoding text, then decoding the result back.
Frequently asked questions
Is Base64 encryption?▼
Does this tool support URL-safe Base64?▼
Can I encode an image or other binary file?▼
Does it handle emoji and non-Latin text?▼
Why does Base64 make the output about 33% bigger?▼
Why do I see '=' signs at the end?▼
Is my data sent to a server?▼
Related tools
JWT Decoder
Decode JSON Web Tokens (JWT) instantly — inspect the header, payload, and signature claims. Runs entirely in your browser; tokens never leave your device. Safe for production secrets.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Catches syntax errors with line numbers, pretty-prints with adjustable indent, supports large payloads. Runs in your browser — no upload.
XML Formatter & Beautifier
Format and beautify XML documents — proper indentation, line breaks, namespace handling. Useful for SOAP responses, sitemaps, RSS feeds, and Android resource files.
URL Encoder & Decoder
Encode/decode URL-safe strings.
HTML Entity Encoder & Decoder
Convert special characters to/from HTML entities.
CSS Minifier
Minify CSS to reduce file size.