Tool Cluster

Encoding

Image to Base64 Converter

Convert image files to Base64 data URIs locally with FileReader and preview pasted data URIs.

Runs locallyNo uploadNo external API

Input

Drop an image hereor choose PNG, JPEG, WebP, GIF, SVG, or AVIF under 2.00 MB.

Output

Choose an image file or paste a Base64/data URI string.

Images are read locally with FileReader. Base64 output can be much larger than the source file.

Choose an image file or paste a Base64/data URI string.
Local-only note

Images are read with your browser's FileReader API and are not uploaded. Large files may be slow on mobile devices.

How to use Image Base64

Convert small image files into Base64/data URI snippets for prototypes, fixtures, CSS examples, and local previews.

  1. Paste or type your input.
  2. Load the sample if you want a quick check.
  3. Run the action, review the result, then copy only what you need.

Examples

PNG file

Input: Select image/png under 2 MB

Output: Data URI, raw Base64, HTML img snippet, CSS background snippet

Pasted data URI

Input: data:image/png;base64,...

Output: Local preview and copied snippets

Oversized file

Input: Image above the limit

Output: Clear size warning before reading

Common use cases

Prototype small assets

Create a data URI for tiny mock assets without uploading a file.

Inspect encoded data

Use the text Base64 page for short non-file values.

Prepare HTML snippets

Escape an img snippet when showing it as code in documentation.

Limitations

File size growth

Base64 strings are larger than binary files and can make HTML or CSS heavy.

No image optimization

This page does not compress, scan, resize, or validate image safety.

FAQ

Are images uploaded?

No. Files are read with the browser FileReader API only.

What file types are accepted?

Common image MIME types such as PNG, JPEG, WebP, GIF, SVG, and AVIF are accepted.

Why is there a file-size limit?

Large Base64 strings can be slow or memory-heavy, especially on mobile devices.