Skip to content
Takikit

File to Base64

Turn an image, font or any file into a Base64 string, data URI, CSS snippet or HTML tag that you can embed straight into code.

Loading tool...

Runs in your browser. Nothing is sent anywhere.

When to use it

A good fit for developers and email marketers who need to embed an icon, small logo or font directly in HTML, CSS or JSON without hosting a separate file on a server.

A Base64 string is about a third larger than the original file, so it only pays off for files of a few KB. For images, pick the CSS form to get a ready background-image line, or HTML to get an img tag with the file name.

How to use

  1. Choose a file or drag and drop it.
  2. Pick the output: data URI, Base64, CSS or HTML.
  3. Click Copy or Download file.

Frequently asked questions

Is the data I paste sent to a server?

No. The tool runs in JavaScript right in your browser, and Takikit has no server that receives data. You can turn off your internet after opening the page and the tool will still work.

Related tools

More Developer tools

See all developer tools