DevTools Hub
All tools

Base64 Encoder and Decoder

Convert text or files to Base64 and back. Handles UTF-8 properly, supports the URL-safe alphabet, and turns images into data URIs.

Base64
UTF-8 safe, so emoji and accented characters survive the round trip.

What the Base64 Encoder and Decoder does

  • Encodes and decodes Base64 in both directions, handling UTF-8 correctly, so emoji and accented characters survive.
  • Supports the URL-safe alphabet, restoring padding automatically when decoding.
  • Converts files and images into Base64 and complete data URIs, with a preview for images.
  • Swaps the result back into the input in one click, so you can check a round trip.

What it doesn't do

  • It doesn't encrypt anything. Base64 is an encoding, not a cipher — anyone can reverse it.
  • It doesn't compress. Base64 makes data roughly a third larger.
  • It doesn't decode Base64 that has been compressed or encrypted first.

Frequently asked questions

Is Base64 encryption?

No, and treating it as such is a real security mistake. Base64 is a way of representing binary data as text so it can travel through systems that expect text. It provides no secrecy whatsoever — this page decodes it instantly, with no key.

What is URL-safe Base64?

Standard Base64 uses + and /, which have special meaning in URLs, and = padding, which is awkward in a query string. The URL-safe variant substitutes - and _ and usually drops the padding. JSON Web Tokens use this variant, which is why a JWT contains no plus or slash characters.

Why does my decoded text look like nonsense?

Most likely the data isn't text at all — an image or other binary file decodes to bytes that aren't valid UTF-8. Use the File tab for binary data. It can also mean the input was URL-safe Base64 decoded as standard, or the reverse.

Should I embed images as Base64 data URIs?

For small icons it saves a network request. For anything larger it's usually a loss: the data is about a third bigger, it can't be cached separately from the page, and it delays first render. Reach for it sparingly.

Related reading

Base64 explained: what it's for, and what it is notBase64 is an encoding, not encryption. What it actually solves, why it makes data a third larger, and when embedding a data URI is a mistake.8 September 2026 · 1 min read
See all encoding & conversion tools →