Halloween sale: 31% off your first Pro purchase. Ends October 31.
File data guide

How to encode or decode a file with Base64

Base64 is useful when binary data needs to be represented as text for APIs, HTML, JSON or other text-based workflows.

Quick answer

Encode a file to Base64 text, or paste Base64 text and decode it back into bytes.

Encoding creates a textual representation of the file. Decoding reverses that representation and downloads the recovered bytes using the filename you choose.

Open Base64 tool →

Encode or decode Base64

  1. For encoding, choose a file.The tool reads the file and converts its bytes into Base64.
  2. Copy the Base64 text.Use the data where your workflow expects Base64 or a data URL.
  3. For decoding, paste Base64 text.Plain Base64 and standard Base64 data URLs are supported.
  4. Choose an output filename.Decode and download the recovered file bytes.
Base64 is not compression

The Base64 text is usually larger than the original binary file.

Data URLs include metadata

A data URL can include MIME type information before the Base64 payload.

Common questions

Does Base64 make a file smaller?

No. Base64 normally increases the amount of text needed to represent the binary data.

Can I decode a data URL?

Yes. Standard Base64 data URLs are supported.

Is Base64 encryption?

No. Base64 is an encoding format, not a security or encryption method.