Base64 Encoder/Decoder
That doesn't look like valid Base64 — check for missing characters.
Encode text or files to Base64, or decode Base64 back to text or an image preview — both directions on one page, with an optional URL-safe variant.
How it works
- Pick Encode or Decode, then type or paste your input
- The result updates instantly below — no separate site for the opposite direction
- Decoding a Base64 image (PNG/JPEG/GIF/WebP) shows an actual image preview instead of garbled text
- Switch to the File tab to turn any file into a Base64 data URI
Frequently asked questions
Is Base64 encryption?
No — it's just an encoding. Anyone can decode it, so don't use it to protect sensitive data.
Can I encode image files too?
Yes — switch to the File tab and upload any file to get a data URI you can paste directly into HTML or CSS.
Can I convert Base64 to an image and see it?
Yes — paste Base64 image data (PNG, JPEG, GIF, or WebP) into Decode mode and a real image preview appears above the output, detected from the file's binary signature, not just guessed from the text.
What is URL-safe Base64 for?
Standard Base64 uses + and / characters, which cause problems inside URLs. URL-safe Base64 replaces them with - and _ instead.
Why do I get an error when decoding?
The input isn't valid Base64 — check for missing characters, extra whitespace, or turn on the URL-safe toggle if the string uses - and _ instead of + and /.
Related tools
From the blog
Update history
- 2026-08-30 Added: a cover image — used as the card thumbnail, social share image, and blog title image.
- 2026-08-29 Fixed: Embed button now works (it silently did nothing before — Astro module scripts made document.currentScript unreliable) and the generated iframe snippet points at the correct /embed/{category}/{slug} URL instead of a 404. Removed: "API" share button — it linked to /api/v1/{slug}, which doesn't exist on this static site and always 404'd. Will return once a real API is built.
- 2026-08-28 Added: image preview when decoding Base64 image data (PNG/JPEG/GIF/WebP), detected by binary signature instead of failing as invalid text.
- 2026-08-28 Launched: two-way Base64 text/file encoder-decoder with URL-safe toggle, one page instead of separate encode/decode sites.