Base64 Encode / Decode

Convert text to and from Base64 with correct UTF-8 handling and a URL safe option.

Plain text
Base64
Output appears here as you type.

About the Base64 Encode / Decode

Base64 is a way of representing binary data using only 64 safe characters: letters, digits, plus, and slash. It is everywhere in web development. HTTP basic authentication headers, data URIs for inline images, JWT segments, email attachments, and many API payloads all use it. This tool converts text to Base64 and back, live, as you type.

Unlike the bare btoa function in JavaScript, this tool handles UTF-8 correctly. Emoji, accented characters, and any non Latin script encode and decode without corruption, because the text is converted to UTF-8 bytes before encoding rather than being treated as Latin-1.

The URL safe option produces the variant used in JWTs and URL parameters: plus becomes minus, slash becomes underscore, and the trailing padding is removed. When decoding, both standard and URL safe input are accepted automatically, and missing padding is tolerated, so you can paste a JWT segment directly.

Keep in mind that Base64 is an encoding, not encryption. Anyone can decode it. It exists to move data safely through systems that expect plain text, not to hide anything. Everything this tool does happens in your browser, so the text you paste is never uploaded anywhere.

Your ad could be here

Reach developers and designers who use these tools every day. Privacy-first, no trackers.

Frequently asked questions

Is Base64 encryption?

No. Base64 is a reversible encoding that anyone can decode. It protects data from being mangled by systems that expect plain text, but it provides no secrecy at all. Never use it to hide passwords or secrets.

What is URL safe Base64?

Standard Base64 uses + and /, which have special meaning in URLs. The URL safe variant replaces + with - and / with _, and usually drops the = padding. JWTs and many web APIs use this variant. This tool can produce it and decodes both variants automatically.

Why does my decoded text look like garbage?

Either the input is not actually Base64, or it encodes binary data such as an image rather than text. Binary data has no meaningful text representation. If you decode a JWT, remember each of its three dot separated segments is encoded separately.

Does this tool handle emoji and non English text?

Yes. Text is converted to UTF-8 bytes before encoding and decoded back from UTF-8, so emoji, Chinese, Arabic, accented characters, and every other script round trip correctly.

Is my data sent to a server?

No. Encoding and decoding run entirely in your browser using the standard TextEncoder and TextDecoder APIs. Nothing you paste here leaves your machine.