Base64 Decode & Encode Online
Convert text to Base64 and back, with emoji and accented characters handled correctly.
Quick answer
Base64 turns bytes into 64 safe text characters so binary data can travel in JSON, email or URLs. It is encoding, not encryption — anyone can decode it. Tokens with three dot-separated Base64 parts are JWTs; read them with the JWT decoder.
About the Base64 Encoder & Decoder
Base64 represents any data using 64 safe characters (A–Z, a–z, 0–9, + and /). It’s used in data URIs, email attachments, HTTP Basic auth headers and JWTs. It is an encoding, not encryption — anyone can decode it.
Browsers’ built-in btoa() fails on characters outside Latin-1. This tool converts text to UTF-8 bytes first, so “café ✓” encodes and decodes correctly.
How to use it
- Choose Encode or Decode.
- Paste your text or Base64 string.
- For URLs and JWTs, tick URL-safe to use - and _ instead of + and /.
- Use Swap to round-trip and check the result.
How it works
Every 3 bytes → 4 Base64 characters
- Output is about 33% larger than the input.
- “=” padding fills the last group when the input length isn’t a multiple of 3.
Frequently asked questions
Is Base64 secure?
No. It hides nothing — it is trivially reversible. Use real encryption for sensitive data.
What is Base64URL?
A variant that swaps + for - and / for _ and usually drops the = padding, so the result can sit in URLs and filenames without escaping. JWTs use it.
Why does decoding give an error?
Either the input has characters outside the Base64 alphabet, or it decodes to binary data (like an image) rather than readable text.
Embed this calculator on your website — free
Copy this code into any page. It works on WordPress, Wix, Squarespace and plain HTML, updates automatically and has no ads.
<iframe src="https://toollantern.com/embed/base64-encode-decode/" title="Base64 Encoder & Decoder" width="100%" height="900" style="border:0;max-width:760px" loading="lazy"></iframe>
<p style="font-size:13px"><a href="https://toollantern.com/base64-encode-decode/">Base64 Encoder & Decoder</a> by ToolLantern</p>Results are estimates for planning — check critical figures with a professional or the official source. Free, no sign-up · updated October 2026.
Popular tools
Image Converter
Convert any image to JPG, PNG or WebP, with quality and size controls.
Image
JPG to PNG Converter
Turn JPG files into PNG right in your browser — drag in one image or thirty.
Image
PNG to JPG Converter
Turn PNG files into JPG right in your browser — drag in one image or thirty.
Image
WebP to JPG Converter
Turn WebP files into JPG right in your browser — drag in one image or thirty.
Image