Base64 Encoder & Decoder

Paste text below, or upload a file, to encode it to Base64 — or paste Base64 to decode it back. Everything happens locally in your browser; nothing is sent to a server.

Input
Output

            

How to use the Base64 Encoder

  1. Type or paste text into the box above, or click Upload file to encode a file's raw bytes.
  2. It encodes automatically as you type, or click Encode.
  3. To go the other way, paste Base64 and click Decode.
  4. Use Copy or Download to grab the result.

Frequently asked questions

Is this Base64 Encoder free to use?

Yes, it is completely free with no sign-up or usage limits.

Is my data uploaded anywhere?

No. Encoding and decoding happen locally in your browser using JavaScript — your text and files are never sent to a server.

Can I encode a file, like an image?

Yes, click "Upload file" and choose any file. Its raw bytes are Base64-encoded directly — this works for images and other binary files, not just text, which is useful for embedding a file as a data URI.

Why does decoding sometimes fail?

Decoding fails if the text is not valid Base64, or if it is valid Base64 but the resulting bytes are not valid UTF-8 text (for example, a Base64-encoded image). In that case the decoded content cannot be displayed as text.

What is Base64 used for?

Base64 represents binary data as plain text using 64 printable characters, which is useful anywhere binary data needs to travel through a text-only channel — for example, embedding images in CSS/HTML, encoding attachments in emails, or including binary data in JSON or URLs.

Related tools