Base64 Encoder / Decoder

Encode or decode Base64 text and files — live, URL-safe, data URIs, 100% client-side

✨ New🔒 Browser Only
Nothing leaves your browser
Plain text
0 chars·0 B
Base64
0 chars
CtrlEnterswap directionCtrlKclear
## Base64 encoding without the copy-paste pain Paste plain text on the left, watch the Base64 appear on the right (or the other way round — auto-detection swaps direction on the fly). Drag a file in and get a ready-to-embed `data:image/png;base64,…` URI with a live preview. All of it runs locally; we never upload your input. ### What makes it actually useful - **Live, two-pane editor.** No "Encode" button — changes flow through a short debounce so typing stays buttery smooth. - **Swap direction with one click** (or `Ctrl+Enter`): last output becomes the next input. - **URL-safe flavour.** Toggle the RFC 4648 §5 alphabet (`-` and `_`, no padding) for JWT-style tokens or URL-embedded payloads. - **Line wrap.** Produce PEM-ready 64-char lines or MIME-ready 76-char lines when you need to paste into an RFC-compliant envelope. - **File to data URI.** Drop an image, PDF, audio or video — get a `data:` URI plus an inline preview so you can confirm it before copying. Download the base64 as `.txt` if you prefer. - **UTF-8 by default, Latin-1 on demand.** Emoji and non-ASCII round-trip correctly; Latin-1 option is there for legacy systems that still need it. - **Shareable state.** Small text inputs sync to the URL, so a coworker can open the same encode/decode with one click. Good for base64-encoding inline images, embedding small binaries in config files, decoding tokens copied out of a log, or just poking at a suspiciously base64-ish string.

Frequently Asked Questions

Everything you need to know about this tool

No. Everything happens in your browser tab. You can verify in DevTools → Network — no request is fired when you type.

When the encoded value will live in a URL, a JWT, an S3 key or anywhere that treats "+" and "/" as reserved characters. URL-safe uses "-" and "_" instead and drops the "=" padding.

The data is probably Latin-1 (or Windows-1252) and not UTF-8. Switch the Charset selector and the output will render correctly. Binary files should be used via the File tab instead.

Up to roughly 100 MB works well on desktop browsers. Above that you may hit memory limits — the whole file needs to live in an ArrayBuffer to produce a data URI.

That is inherent to Base64: three input bytes become four ASCII characters, plus a data-URI header for the File tab. We show the original and the encoded size side-by-side so you can see exactly what you are about to copy.

Yes — small Text-mode inputs are mirrored to the address bar (capped so we never create multi-kilobyte URLs). The File tab never touches the URL; binary blobs belong in your clipboard, not your history.