Image tools

Image to Base64

Turn a small image into a data URL for HTML, CSS and prototypes.

Your image

Choose your fileOr drop a file here
No file selected

JPEG, PNG or WebP · up to 2 MB.

Processed in your browser

Your result

A little input. A useful result.

Choose your file or files, then select Create data URL.

A LITTLE KNOW-HOW

About this tool

Create a Base64 data URL from an image without changing its original bytes. This is useful for small embedded assets or quick prototypes. Base64 usually increases the encoded payload by about one third, so separate image files are generally better for large website images.

How to use it

  1. 1

    Select a small JPEG, PNG or WebP file.

  2. 2

    Generate the data URL.

  3. 3

    Copy the complete result into your HTML or CSS.

Questions, answered

What is the size limit?

This tool limits input to 2 MB to keep the output manageable. Use ordinary image files for larger assets.

Can I paste it into an image tag?

Yes. Use the full result as the src value of an img element. Content Security Policy rules on your website must allow data images.