Base64 Encoder & Decoder
Encode or decode UTF-8 text, URL-safe Base64 strings, and local files safely inside your browser.
Runs 100% in your browser · Files are never uploadedHow to use Base64 Encoder
- Paste plain text on the top box and click Encode to Base64, or paste Base64 in the lower box and click Decode to Text.
- Toggle URL-safe Base64 when working with JWTs or query-string tokens.
- Use Encode File to Base64 or Download as File to convert local images and binary payloads.
UTF-8 safe Base64 conversion in the browser
Developers often reach for Base64 when embedding small SVG/PNG assets as CSS Data URIs, inspecting JWT payloads, or testing HTTP Basic Auth headers. Because pasting private credentials or tokens into random server-side tools is risky, running Base64 encoding completely offline inside browser memory keeps secrets on your machine.
This tool handles full multi-byte UTF-8 text cleanly and accepts both standard Base64 and URL-safe (-/_) variants automatically when decoding.
Frequently asked questions
Does this Base64 tool handle UTF-8 emoji and non-ASCII characters properly?
Yes. Text is encoded via TextEncoder (UTF-8 bytes) before Base64 conversion, preventing the character-corruption errors common with plain window.btoa() on Unicode strings.
What is URL-safe Base64?
URL-safe Base64 (RFC 4648 Section 5) replaces + and / with - and _ and omits trailing = padding so tokens can sit cleanly inside URL query parameters and JWT segments.
Can I convert an image or binary file into a Base64 Data URI?
Yes. Click Encode File to Base64 to read any local image, font, or small file in browser memory and generate its Data URI string.
Can I decode a Data URI or Base64 string back into a downloadable file?
Yes. Paste a Base64 string or data:...;base64,... URI into the Base64 box and click Download as File.
Are API tokens or secrets pasted here ever logged?
No. Everything runs locally in your browser tab and nothing is transmitted over the network.