Base64 Encoder & Decoder

Encode text to Base64 or decode it back — with full Unicode support and file conversion.

Runs in your browser — your code and data never leave this device


File to Base64

Select a file to generate its Data URL (which includes the Base64 data). Useful for embedding small images or files in CSS, HTML, or JSON.

Related tools

How to use the Base64 Encoder & Decoder

  1. Choose Encode or Decode using the toggle at the top.
  2. Type or paste your text into the Input box — the output updates live as you type.
  3. Click Copy output to copy the result, or Swap to move the output back into the input and flip the mode.
  4. To convert a file, use the File to Base64 panel below: pick a file and copy its full Data URL.

Frequently asked questions

Is my data uploaded to a server?

No. Encoding, decoding, and file conversion all run locally in your browser. Your text and files are never uploaded, stored, or sent anywhere.

Does this tool handle Unicode and emojis?

Yes. Encoding uses TextEncoder to convert your text to UTF-8 bytes before applying Base64, so accented characters, non-Latin scripts, and emojis encode and decode correctly.

Why did decoding fail with “not valid UTF-8”?

Base64 can represent any bytes, not just text. If the decoded bytes are not valid UTF-8 text (for example, a binary file encoded as Base64), the tool reports that instead of showing garbled text. Use the file workflow for binary data.

What is a Data URL?

A Data URL looks like data:image/png;base64,iVBOR… — it contains the file type plus the Base64 data, so a file can be embedded directly in HTML, CSS, or JSON without a separate file.

Is Base64 encryption?

No. Base64 is an encoding, not encryption. Anyone can decode it. Do not use it to protect passwords or secrets.