Skip to main content

File to Base64 Converter

Convert any file to a Base64 string right in your browser — get the raw Base64 or a ready-to-embed data URL for HTML, CSS or JSON.

Input

Drop a file or browse
One file · any type

The file is read locally — it is never uploaded.

Output

Base64 string
Was this helpful?

Guides

What does this converter do?

Drop in any file — an image, font, PDF, certificate — and get its contents as a Base64 string. Choose between the raw Base64 payload or a complete data URL (data:image/png;base64,…) you can paste straight into HTML src attributes, CSS url() values or JSON fields.

Common uses

  • Inlining small images or icons into HTML/CSS to avoid extra requests.
  • Embedding fonts or certificates in configuration files.
  • Preparing binary payloads for JSON APIs that only accept text.

How to use it

  1. Drop a file onto the uploader (or click to browse).
  2. Pick Base64 only or Data URL.
  3. Copy the result or download it as a text file.

Keep in mind Base64 output is ~33% larger than the original file — inlining is best for small assets.

Privacy

The file is read with your browser's FileReader and converted locally. It is never uploaded to any server.

base64fileconverterdata-url

Part of a workflow

All collections

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.