How to Use the Image to Base64 Converter: Step by Step Guide
Convert an image to Base64 text in your browser: a data URL, plain Base64, an HTML img tag or a CSS background rule. This guide shows what to enter, each step from choosing a file to downloading the result, and the limits to keep in mind. The Image to Base64 Converter tool is free, needs no account and runs in your browser.
What you need
- Choose an image: a file (.svg, .ico, .avif)
- Output format: choose Data URL, Base64 only, HTML
tag, CSS background image
Step by step
- Open the Image to Base64 Converter tool.
- Choose an image from your device.
- Choose Output format.
- Run the tool and download the result. The file is processed on your own device and is not uploaded.
How it works
The file's bytes are encoded as Base64 (every 3 bytes become 4 characters) and, for a data URL, prefixed with data:, the image type and ;base64,. Choose your file and the result is ready in a moment. It is processed in your browser, so nothing is uploaded.
Things to keep in mind
Images up to 5 MB. Base64 text is about a third larger than the image, so it suits small images such as icons and logos; large images are better linked as files.
Related tools
If this is not quite what you need, try Base64 Encoder and Decoder, Image Compressor or SVG to PNG Converter.