Base64 Encode / Decode
Processed Client SideEncode plain text or files to Base64 or decode Base64 back to text. Supports Unicode, URL-safe mode, and local file encoding.
Bookmark this tool now — skip the search next time you need it.
About Base64 Encode / Decode
This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.
Encode text or a file to Base64, and decode Base64 back to text. Base64 exists because a lot of transports — email bodies, JSON string fields, HTTP headers, data URIs, YAML config — can only carry plain ASCII safely, so binary or unicode data has to be re-expressed using 64 printable characters. This tool handles both directions, is fully unicode-safe so emoji and non-Latin scripts round-trip correctly, and can produce URL-safe output where the + and / characters are swapped for - and _ so the result can be dropped into a URL or a JWT without further escaping. Drop in a file and it returns a complete data URI you can paste straight into CSS or an img tag.
Key features
- Encode and decode in one place, switched with a single control
- Full unicode support — emoji, accented characters, and CJK text survive a round-trip intact
- URL-safe mode replaces + and / with - and _ and drops padding, matching the base64url encoding used by JWTs
- Drop in a file up to 10 MB and get a ready-to-use data URI with the correct MIME type prefix
- Clear error messages that distinguish invalid characters from missing padding
- Live conversion as you type — no need to press a button for text
- One-click copy of the result, and a Clear button for the file and the text
- Everything runs in your browser, so credentials, tokens, and private files are never uploaded
How to use it
- Choose Encode or Decode with the toggle in the toolbar.
- Paste your text into the input pane — the output updates as you type.
- To encode a file instead, use the file picker; the output becomes a full data URI.
- Turn on URL-safe if the result will be used in a URL, a filename, or a JWT segment.
- Click Copy output to put the result on your clipboard.
Tips & common mistakes
- Base64 is encoding, not encryption. Anyone can decode it in a second — never use it to protect a secret, only to transport one safely.
- Encoding inflates size by roughly 33%. A 3 MB image becomes about 4 MB of Base64, which is why inlining large images as data URIs slows pages down.
- If decoding fails, check the length: valid Base64 is a multiple of 4 characters, padded with = signs. A string copied out of a wrapped email or a terminal is often missing its padding or has stray newlines.
- JWT segments use base64url, not standard Base64 — turn URL-safe on when hand-decoding one, or use the JWT Decoder which handles the whole token.
- Data URIs are great for small icons and inline SVG, where they save a request. For anything over a few KB, a normal file reference caches better.
- A Base64 string that decodes to unreadable bytes was probably encoded binary, not text — that is expected for images, fonts, and archives.