Base64 Encode and Decode

Convert text or files to Base64 and back. Your data stays on your device.

  • Runs in your browser
  • No sign-up
  • No watermark

Base64 turns any data into plain letters, digits, plus and slash, so it can travel in places that only accept text, such as JSON, email or a data URL. This tool encodes text as UTF-8, so accents and emoji survive, and it can encode a whole file. Decoding accepts standard and URL-safe Base64, with or without padding. Nothing is sent to a server.

Base64 is not encryption. Anyone can decode it.

How to use Base64 Encode and Decode

  1. Choose Encode or Decode.
  2. Type or paste your text. To encode a file, choose it in the box below.
  3. Turn on URL-safe, line wrapping or a data URI prefix if you need them.
  4. Copy the result or download it.

Frequently asked questions

Is my data uploaded?

No. Encoding and decoding happen in your browser.

Does it handle accents, emoji and other languages?

Yes. Text is converted to UTF-8 bytes before encoding, and decoded the same way, so non-English text round-trips correctly.

What is URL-safe Base64?

A variant that uses - and _ instead of + and /, and usually leaves out the = padding. It is used in JWTs and in links. Decoding accepts both kinds automatically.

Can I encode a file, such as an image?

Yes. Choose the file and the Base64 text appears. You can add a data: URI prefix to use it directly in HTML or CSS. Files up to 25 MB are supported.

Why does decoding show an error?

The text contains characters Base64 does not use, or its length is not valid, which often means it was cut off when copied. Spaces and line breaks are ignored.

What if the decoded data is not text?

If the bytes are not valid UTF-8 text, such as an image or a PDF, the tool says so and you can download the result as a file instead.

Is Base64 a way to protect data?

No. It only changes the format. Anyone can decode it, so do not use it to hide secrets.