Base64 Encode / Decode

Convert text to Base64 for HTTP headers, data URIs, JSON payloads or email, and decode Base64 strings you find in tokens, configs or logs. Works with emoji and every script, not just ASCII.

How to use Base64 Encode / Decode

  1. Choose Encode or Decode.
  2. Type or paste your text. The result updates instantly.
  3. For JWTs and URLs, tick “URL-safe alphabet”; for email attachments, wrap lines at 76 characters.
  4. Copy the result. To embed an image or font in CSS or HTML, use “Encode a file…” to get a data URI.

About this tool

Base64 represents binary data using 64 safe characters (A–Z, a–z, 0–9, + and /). Every 3 bytes become 4 characters, so encoded data is about 33% larger, and “=” pads the end when the input length is not a multiple of three. It is an encoding, not encryption: anyone can decode it, so never use it to hide passwords.

Text is first converted to UTF-8 bytes, which is why “é” encodes as w6k= and emoji work. The browser’s built-in btoa() fails on such characters; this tool does not. When decoding, the output is checked for valid UTF-8 – if the bytes are an image or other binary file you get a clear message and a download button instead of garbled text.

The URL-safe variant (RFC 4648 §5) replaces + with - and / with _ and drops the padding, so the result can sit in a URL or file name. It is used by JSON Web Tokens. The decoder accepts both alphabets, with or without padding and line breaks.

Frequently asked questions

Is Base64 encryption?

No. It is a reversible encoding with no key. Anyone can decode it, so it offers no security.

Why does my decoded text look garbled?

Either the data is binary (an image, PDF or compressed file) or it was encoded from a different character set. The tool tells you when the bytes are not valid UTF-8 text.

How do I decode a JWT?

Split the token at the dots and decode the first two parts (header and payload). They use the URL-safe alphabet without padding, which the decoder accepts.

Are my texts uploaded to a server?

No. The whole process runs inside your browser with JavaScript. Your texts never leave your device, which also means the tool keeps working if you go offline after the page has loaded.

Is this tool really free?

Yes. There is no sign-up, no daily limit, no watermark and no paid tier. The site is supported by advertising shown on the page, not by charging for the tools.