Skip to main content
HandyWeb

File to Base64 and Data URI

Turn a file or image into Base64 or a Data URI, or turn Base64 back into a file and download it.

Runs on your device.

Action
Output format

How to Use It

  1. Choose the action.
  2. Choose a file, or paste the Base64.
  3. Copy the output or download the file.

Questions and Answers

What is a Data URI for?

To put a small image straight into HTML or CSS, without a separate file. It is not good for large files, because it makes the page heavy.

Good to Know

Files up to 10 MB. The file type is detected from its first bytes (PNG, JPEG, GIF, WebP, PDF, ZIP, and a few more). Other types are saved as .bin.

Source code of this toolReport a problem on GitHub