Skip to content

Image to Base64

Turn an image into a data URI you can paste straight into CSS, HTML or Markdown. The encoding happens in your browser — the file is never uploaded.

Choose your images

up to 1 at a time.

JPGPNGWebPAVIFGIFSVGMax 5 MB each

When a data URI is worth it

Embedding an image saves a network request, which is useful for tiny icons, email templates where attachments are awkward, and single-file demos.

It costs size. Base64 stores three bytes in four characters, so the text is about a third larger than the file, and it cannot be cached separately from the page that holds it. Above roughly 10 KB, a normal image file is usually the better choice.

How to use Image to Base64

  1. Add your image

    JPG, PNG, WebP, AVIF, GIF or SVG, up to 5 MB. It is encoded in your browser.

  2. Pick the format

    The plain data URI, or ready-made CSS, HTML or Markdown.

  3. Copy or download

    Copy it to the clipboard, or save it as a .txt file.

Why use SlimFile.app for this

  • Nothing is uploaded

    The encoding happens in your browser, which is the honest way to do it: the encoded text is the file.

  • Paste-ready snippets

    The data URI on its own, or wrapped for CSS, HTML and Markdown.

  • Free, no sign-up

    No account, no email address, no trial that runs out.

  • No watermark

    What you download is clean — nothing added to your file.

  • Never leaves your device

    This tool runs entirely in your browser. Your file is not uploaded anywhere.

Questions

When should I use a Base64 image?
For tiny icons, email templates where attachments are awkward, and single-file demos — anywhere saving a network request is worth more than the extra size.
Why is the Base64 text bigger than my file?
Base64 stores three bytes in four characters, so the text is about a third larger than the image. Above roughly 10 KB, a normal image file is usually the better choice.
Can I convert an SVG?
Yes. SVG is accepted here because this tool only encodes the bytes and never has to read the file.

HEIC to JPG

Turn iPhone photos into JPGs that open anywhere.

JPG

Convert Image

Change images between JPG, PNG, WebP and AVIF.

JPGPNGWebPAVIF

Extract Images

Pull the pictures out of a PDF at full resolution.

JPGPNG

Resize Images

Scale images down in batches, by edge or percentage.

JPGPNGWebP