Free · runs in your browser
Base64 Encode & Decode
Convert text to Base64 and back. Unicode is handled as UTF-8, URL-safe output is one tick away, and nothing is sent to a server.
Type or paste text, then choose Encode or Decode.
How to use it
- Type or paste text into the Input box.
- Press Encode to get Base64, or paste Base64 and press Decode to get the text back.
- Tick URL-safe before encoding if the result goes in a URL, a filename or a JWT.
Want the background? Read what Base64 is and when to use it.
Example
Hello, world → SGVsbG8sIHdvcmxk
Standard Base64 can contain +, / and trailing =. The URL-safe form replaces the first two with - and _ and drops the padding.
Frequently asked questions
Is Base64 encryption?
No. Base64 is an encoding that anyone can reverse without a key. Never use it to hide passwords or secrets.
Why is the output longer than the input?
Base64 turns every 3 bytes into 4 characters, so the output is about 33% larger than the input, plus padding.
What is URL-safe Base64?
A variant that uses - and _ instead of + and /, and usually drops the = padding, so the result can sit inside a URL or filename. It is defined in RFC 4648, section 5.
Does it handle emoji and accented text?
Yes. Text is converted to UTF-8 bytes before encoding, so any Unicode character round-trips correctly. Functions that assume one byte per character, like a bare btoa, fail on such text.
Why does decoding fail?
Either the text is not valid Base64, or it decodes to bytes that are not UTF-8 text, such as an image or a compressed file. This tool decodes text only.