File to Base64

Convert files to Base64 / data URL and back. Free, no sign-up, files stay on your device.

Choose a fileor drag and drop a file here

🔒 100% private — processing happens in your browser. Nothing is uploaded.

How to convert a file to Base64

  1. Choose File → Base64 and select a file.
  2. Tick “Data URL” to get data:…;base64,… for HTML or CSS.
  3. Copy the result.
  4. For the reverse, choose Base64 → File, paste the text and download.

Embed files as text

Base64 turns any file into text so it can be put inside HTML, CSS, JSON, emails or API requests. Small icons are often embedded as data URLs to save a request.

Base64 is about 33% bigger than the original, so it is best for small files.

Questions and answers

Why is the text so long?

Base64 adds about a third to the size.

Is Base64 encryption?

No, anyone can decode it.

Are my files uploaded?

No, they stay on your device.

Is it free?

Yes, no sign-up.