Base64 Decode and Encode
Use this base64 decode tool to turn Base64 into text, or encode text to Base64, entirely in the browser. It handles UTF-8 and emoji, the URL-safe alphabet (- and _), and missing padding, and it shows a clear error for invalid input.
How to use
- Choose Decode or Encode.
- Paste Base64, or type the text to encode. Spaces and line breaks in Base64 are ignored.
- For encoding, turn on URL-safe output if you need - and _ instead of + and /, without = padding.
- Read the result and use Copy. Invalid Base64, and bytes that are not UTF-8 text, show an error. Nothing is uploaded.
How it works
Encoding turns the text into UTF-8 bytes, then writes those bytes with the Base64 alphabet (A–Z, a–z, 0–9, + and /) and = padding. URL-safe output swaps + and / for - and _ and drops the padding. Decoding accepts either alphabet, adds missing padding when the length is not a multiple of 4, and reads the bytes back as UTF-8.
Example. Hello encodes to SGVsbG8=. The same value without the final = still decodes to Hello. The emoji 😀 encodes to 8J+YgA==, and the URL-safe form is 8J-YgA.
Frequently asked questions
What is Base64?
A way to write binary data using 64 text characters (A-Z, a-z, 0-9, + and /), so it can travel through text-only systems.
Is Base64 encryption?
No. Anyone can decode it. Do not use it to protect secrets.
What is URL-safe Base64?
A variant that uses - and _ instead of + and / so the string can sit in a URL.
Why do some strings end with = signs?
The = is padding that makes the length a multiple of 4. This tool accepts strings with or without it.
Is my data uploaded?
No. Decoding and encoding run entirely in your browser.
Related tools
- DevJSON Formatterin-browser JSON pretty-printer, minifier, and syntax validator.
- DevRegex TesterTest JavaScript regular expressions with live match highlighting.
- DevBarcode GeneratorEncode a SKU or number as Code 128, Code 39, EAN-13, or UPC-A and download PNG or SVG.
- DevSubnet CalculatorCIDR to netmask, hosts, network, and broadcast for IPv4.
- DevUPC GeneratorBuild a valid UPC-A barcode digit string with check digit.