Base64 Encoder and Decoder
Encodes and decodes Base64, including the URL-safe alphabet. Text is converted to UTF-8 bytes first, so emoji, Sinhala and Chinese survive — many online tools wrap btoa and break on all three.
Base64 Encoder and Decoder
Base64
SGVsbG8g8J+agCDgt4Pgt5LgtoLgt4Tgtr0=
How to use it
- Choose encode or decode with the toggle.
- Paste your text or your Base64 string into the box.
- Switch on URL-safe if the value goes into a URL or a JWT — it swaps plus and slash for hyphen and underscore and drops padding.
- Decoding accepts either alphabet and tolerates missing padding, so you can paste a JWT segment directly.
- If decoding reports invalid UTF-8, the data is binary — an image or an archive — rather than text.
Frequently asked questions
- Is Base64 encryption?
- No. It is an encoding, fully reversible by anyone, with no key involved. Never use it to protect anything — it exists to move binary data safely through text-only channels.
- Why do other Base64 tools break on emoji?
- Because they call btoa directly, which only accepts Latin-1 characters and throws on anything above code point 255. This page encodes to UTF-8 bytes first, which is what every server-side implementation does.
- What is URL-safe Base64?
- A variant using hyphen and underscore instead of plus and slash, usually with the padding removed, so the result can go into a URL or a JWT without further escaping.
Related tools
- URL Encoder and DecoderPercent-encode or decode URLs and query parameters, and break any URL into its parts. Handles the component and full-URL distinction correctly.
- JWT DecoderDecode a JSON Web Token in your browser and read its header, payload and claims. Expiry is checked against your clock. Nothing is ever uploaded.
- SHA Hash GeneratorGenerate SHA-256, SHA-384, SHA-512 or SHA-1 hashes of any text in your browser, using the Web Crypto API. Nothing is uploaded.
Built and maintained by Kavitha Kanchana
Software engineer at Cortana AI and co-founder of Ryzera Technologies, based in Sri Lanka. Found a bug or a wrong number? Email me.