Convert text to and from Base64 with full UTF-8 support and a URL-safe variant, right in your browser. Base64 turns arbitrary bytes into 64 printable characters so they can travel safely through systems that only expect text.
How to use it
- Paste or type your text into the input box.
- Choose Encode to produce Base64, or Decode to turn Base64 back into readable text.
- Tick the URL-safe option if the result will be placed in a query string, path segment, or cookie.
- Copy the output with one click.
Decoding is strict: if the input is not valid Base64 you will be told rather than shown silently mangled output.
Why UTF-8 handling matters
Base64 operates on bytes, not characters. Naive implementations built on the browser btoa() function throw an error the moment they meet a character outside Latin-1, which is why so many online encoders mangle accented letters, Cyrillic, CJK text and emoji. This encoder first converts your text to UTF-8 bytes, then encodes those bytes, so a string such as cafe latte with an accent, or a rocket emoji, survives a full round trip unchanged.
The alphabet itself is 64 characters: A-Z, a-z, 0-9 and two extras. Every three input bytes (24 bits) become four output characters of six bits each, which is why Base64 output is always about 33% larger than the input. When the input length is not divisible by three, the encoder appends = padding so the length stays a multiple of four.
Standard versus URL-safe
Standard Base64 uses + and / as its final two characters. Both are hostile inside a URL: + is interpreted as a space when a query string is decoded, and / breaks path parsing. The URL-safe variant defined in RFC 4648 substitutes - and _ respectively and usually drops the = padding. This is the encoding you see in JSON Web Tokens, OAuth state parameters and signed cookies.
Frequently asked questions
Is Base64 a form of encryption?
No, and treating it as one is a genuine security mistake. Base64 is a reversible encoding with no key. Anyone can decode it instantly. It hides nothing. If you need confidentiality you need real encryption; if you need integrity you need a signature or MAC. Base64 only makes binary data safe to transport as text.
Why does my decoded output look like garbage?
Usually the input was not actually Base64, or it was a URL-safe variant being decoded with the standard alphabet. Whitespace and line breaks pasted from an email are also a common culprit. Check that the string contains only the expected alphabet and that its length is a multiple of four once padding is counted.
Does my text get uploaded anywhere?
No. The entire conversion runs in JavaScript inside your own browser tab, so nothing you paste is transmitted to a server or logged. You can disconnect from the network and the tool still works.
Related tools: URL Encoder / Decoder, Hex / ASCII / Binary Converter, JWT Decoder.