Free Tool

Base64 Encoder & Decoder

Encode any text or file to Base64, or decode a Base64 string back to its original form. Runs entirely in your browser.

Convert a File to Base64 and Decode Base64 to File

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data as an ASCII string. It is used to embed images in CSS, transmit binary data over text-based protocols, and store binary blobs in JSON.

Encoding vs decoding

Encoding converts raw bytes to a Base64 string. Decoding reverses that — it takes a Base64 string and returns the original bytes. This tool handles both directions.

File encoding

Upload any file to convert it to a Base64 data URI. This is useful for embedding small images directly in HTML or CSS without an extra HTTP request.

How to use

  1. To encode text: type or paste text into the input and the Base64 output appears instantly.
  2. To encode a file: click Choose File, select any file, and the Base64 data URI is generated.
  3. To decode: paste a Base64 string and click Decode to see the original content.

Your files and strings stay in your browser — nothing is uploaded to any server.

Frequently Asked Questions

Is Base64 encryption?
No. Base64 is an encoding scheme, not encryption. It does not protect data — anyone can decode it. Use it only for encoding, not security.
Why does Base64 increase file size?
Base64 encodes every 3 bytes as 4 ASCII characters, adding roughly 33% overhead. This is a known trade-off when embedding binary data in text formats.
Can I encode any file type?
Yes. Upload any file and this tool will generate its Base64 data URI. Large files produce very long strings — be mindful of size limits in your target context.
Is my data sent to a server?
No. All encoding and decoding happens in your browser using the FileReader and atob/btoa APIs.