Base64 file converter

Convert a string, file, or image into its base64 representation.

About Base64 file converter

Encodes any file (image, PDF, font, archive) into a Base64 string, and turns a Base64 string back into a downloadable file, detecting the type from the data when possible. Everything happens in your browser.

When you would use it

How to use it

  1. To encode, drop a file onto the upload area and copy the Base64 output.
  2. To decode, paste a Base64 string (with or without the data: prefix), set a file name and extension if the type is not detected, and press download.
  3. Use the preview to confirm an image decoded correctly.

Things worth knowing

Frequently asked questions

Why is the decoded file damaged or will not open?
Usually the Base64 string was truncated, had line breaks or spaces inserted by an e-mail client, or was URL-safe Base64 (with - and _). Clean the string and make sure its length is a multiple of 4 (padding with =).
Is Base64 a way to hide or protect a file?
No. It is an encoding anyone can reverse instantly. Use encryption if confidentiality matters.

All the tools