Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly.
How to use
- Choose Encode or Decode.
- Type or paste your text into the input.
- For encoding, optionally enable URL-safe output.
- The result appears instantly below.
- Copy the output with the Copy button.
About this tool
ShowHide
Encode text to Base64 or decode Base64 back to text, entirely in your browser, with a URL-safe variant for use in URLs and filenames. Base64 represents arbitrary bytes using 64 safe characters (A–Z, a–z, 0–9, + and /), so binary or non-ASCII data can travel through systems built for plain text — email bodies, JSON fields, data: URIs and HTTP headers. Encoding uses UTF-8, so accented letters, emoji and any Unicode round-trip correctly. Because everything runs locally, you can encode secrets or tokens without sending them anywhere. Note that Base64 is an encoding, not encryption: anyone can decode it, so it guards against corruption in transit, not against being read.
Frequently asked questions
Does it support Unicode and emoji?
Yes. Text is encoded as UTF-8 first, so any character including emoji round-trips correctly.
What is URL-safe Base64?
It replaces + and / with - and _ and drops padding, so the result is safe in URLs and filenames.
Is my text uploaded?
No. Everything is processed locally in your browser.
Why does decoding fail?
The input isn't valid Base64. Check for stray characters or incomplete data.
Is Base64 a form of encryption?
No. Base64 is a reversible encoding with no key — anyone can decode it instantly. It exists to carry binary data safely through text-only channels, not to keep data secret. For confidentiality you need actual encryption.
Why is the encoded output larger than the input?
Base64 represents every 3 bytes as 4 characters, so the output is about 33% larger than the input. That overhead is the price of using only text-safe characters, and it is expected.
Guides on this topic
- Number Bases and Text Encodings: A Developer's Cheat SheetA practical primer on binary, octal, decimal and hexadecimal, plus how text becomes bytes through UTF-8, Base64 and URL encoding — with the rules you actually need.
- Hashing vs Encryption vs Encoding: What's the DifferenceThree terms that are constantly confused — hashing, encryption and encoding — explained clearly, with what each is for, when to use which, and the mistakes to avoid.
Related tools
Data URI Parser & Decoder
Decode a data: URI to see its MIME type, encoding, size and decoded contents, in your browser.
Developer
Image to Base64
Convert an image to a Base64 data URL you can paste anywhere.
Image
URL Encoder / Decoder
Percent-encode text for URLs, or decode encoded URLs back to text.
Developer
Protobuf Decoder (no .proto needed)
Paste base64 or hex protobuf bytes and read the fields — numbers, wire types, nested messages, strings and packed arrays — without a schema.
Developer
Base64 to Hex Converter (and back)
Convert a Base64 string to hexadecimal bytes and hex back to Base64, with URL-safe support, in your browser.
Developer
String Escape Converter
Escape a string for 10 contexts at once — JavaScript, JSON, HTML entities, URL, SQL, regex, Bash (single/double quote), C string, Unicode \u escapes.
Developer