Base64 Encoder / Decoder

  • Free forever
  • No sign-up
  • Runs in your browser
Processed on your device

Encode text to Base64 or decode Base64 back to text. Handles emoji and accents (UTF-8) and URL-safe Base64 from JWTs.

About Base64 Encoder / Decoder

Converts text to Base64 and back, the encoding used in email attachments, data URIs, HTTP Basic authentication headers, JSON Web Tokens and API payloads. Text is handled as UTF-8, so accents, Arabic, Chinese and emoji survive the round trip. Tick URL-safe for the variant used in web addresses and JWTs; decoding accepts either form, ignores spaces and line breaks, and strips a data: prefix for you.

How to use Base64 Encoder / Decoder

  1. Type text to encode, or paste Base64 to decode, into the Input box.
  2. Tick URL-safe if you need - and _ instead of + and /, with no = padding.
  3. Click Encode or Decode, and the result appears in the Output box.
  4. Click Copy to take the result, or Use result as input to reverse it.

How your data is handled

Encoding and decoding run in your browser, with no extra downloads, so the text you paste isn't uploaded or stored. Take care with decoded passwords or tokens on shared screens.

How SAA Tool works · Privacy Center

Limits and accuracy

  • Decoded files download as decoded.bin, so rename them with the right extension, such as .pdf or .png.
  • Text is always encoded as UTF-8; a system expecting UTF-16 or Latin-1 will decode it differently.
  • Only Base64 and Base64URL are supported, not Base32, Base58 or other encodings.

Questions and answers

Is Base64 encryption?

No. Base64 only repackages data as plain letters and numbers, and anyone can decode it in a second. Never rely on it to hide passwords or personal data.

What if the Base64 decodes to a file, not text?

The tool tells you it's binary data, probably a file or image, and offers a Download the file button. Data URIs starting with data: are fine too, because the prefix is removed before decoding.

Can I convert an image to Base64 here?

This page encodes text. To turn a picture into Base64 or a data URI for HTML or CSS, use Image to Base64. Both run in your browser without uploading anything.

Why is the Base64 text longer than the original?

Base64 turns every 3 bytes into 4 characters, so the result is about a third bigger, plus up to two = signs of padding. Accents and emoji take several bytes each in UTF-8, so text with them grows even more.

What is URL-safe Base64?

It's the base64url variant from RFC 4648, which uses - and _ instead of + and /, and usually drops the = padding. It's used in JWTs and web addresses, where + and / can cause problems. Decoding here accepts both forms.

Why does it say my Base64 is invalid?

Base64 may only contain A-Z, a-z, 0-9, + and / (or - and _), with up to two = signs at the end. Spaces and line breaks are ignored, but any other character, or a length that leaves one character over, can't be decoded.

Do I need to sign up?

No. Base64 Encoder and Decoder is free with no sign-up, no login and no daily limit, and there's nothing to install. It works on a phone as well as a PC.

Can I decode Base64 to an image or a file?

It decodes text, including UTF-8 and URL-safe Base64. For a picture or a PDF, paste the whole data URL (starting data:image/...) into a browser address bar to view it; this tool is for text.

Sources and standards

Related guides

Report a problem with this tool