Home / Tools / Image to Base64

Image to Base64 Converter: Make a Data URI from an Image

Convert a PNG, JPEG, GIF, WebP or SVG image to a Base64 data URI, with ready HTML and CSS snippets. Your image never leaves your browser.

Choose, drop or paste an image to see a preview with its name, type, pixel size and file size, then get its Base64 text, a data URI, an HTML img tag and a CSS background rule, each with a Copy button. You can remove it or use another image at any time. The image is read in your browser and is not uploaded.

Drop an image here, paste one (Ctrl+V), or

Your image stays on your device. Up to 10 MB.

What it does

Frequently asked questions

When should I use a data URI?
For small images such as icons, where saving a request helps. Base64 is about 33% bigger than the file, and large data URIs slow the page and cannot be cached on their own.
Is my image uploaded?
No. The file is read by your browser only.
What is the size limit?
10 MB, though images over 100 KB are rarely a good fit for a data URI.

Runs in your browser. Nothing you type is sent to this site. Updated 2026-10-11.

More tools

Code formatters

CSS beautifier CSS minifier HTML beautifier HTML minifier JavaScript beautifier JavaScript minifier JSON formatter YAML formatter XML formatter SQL formatter Markdown preview

Converters

Base64 encoder and decoder URL encoder and decoder Unix timestamp converter CSV to JSON JSON to CSV HTML entity encoder and decoder Number base converter Time zone converter JSON to TypeScript XML to JSON HTML to Markdown Date difference calculator

Text tools

Regex tester Remove duplicate lines Lorem ipsum generator Word counter Case converter Text diff checker

Color and images

Color converter Contrast checker Image resizer

Network

Subnet calculator Download time calculator Common ports list CIDR to IP range IPv6 address expander and compressor MAC address formatter curl command builder

Server and files

Cron expression explainer chmod calculator HTTP status codes

Encoding and security

Password generator UUID generator Hash generator JWT decoder QR code generator Password strength checker Wi-Fi QR code generator