Image to Base64 Converter

Convert JPG, PNG or WebP into a data URL, raw Base64, HTML or CSS text.

Free. No signup.

Drop your image here

Drag and drop, or choose a file below

JPG · PNG · WEBP
Maximum file size: 5 MiB
Each image: up to 16 megapixels and 8192 px per side

This preserves the original file bytes, including any metadata. Base64 is not encryption and usually adds about one third to the size. Use the metadata remover first if needed.

100% local processing

How to use

  1. 01

    Choose a JPG, PNG or WebP image, or try the local sample.

  2. 02

    Encode the image and select a data URL, raw Base64, HTML image element or CSS declaration.

  3. 03

    Copy the encoded text or download the text file.

Details and tips

How it works

Base64 represents the original binary file using text. The converter does not redraw or recompress the image. Copy the generated string or download a UTF-8 text file for your code.

Made for everyday images

Embed small icons, create test fixtures and prepare image data for APIs that accept Base64.

Frequently asked questions

Does encoding remove metadata or encrypt the image?

No. Original bytes and metadata are retained. Base64 is reversible encoding, not encryption. Remove metadata first if needed.

Are my images uploaded?

No. These tools process image data on your device. Images and encoded text are not saved to your account.

Which images are supported?

JPG, PNG and WebP up to 8192 px per side and 16 million pixels. Pixel-based effects and comparison use a single still frame of animated files. Base64 conversion preserves original bytes and has a 5 MiB file limit.