Image to Base64
Turn an image into a Base64 string to embed it straight into HTML, CSS or emails without a separate image file.
How to convert an image to Base64
- Add an image (up to 5 MB).
- Choose the output: data URI, plain Base64, an img tag or CSS.
- Click copy and paste it where you need it.
Frequently asked questions
For small images such as icons and logos in emails or single HTML pages — the image travels inside the code and can't break. For large images, use a normal image file.
Base64 is always about a third longer than the original. That is how the encoding works, not an error.
It is completely free and needs no sign-up.
JPG, PNG, WEBP, GIF, BMP and AVIF, up to 5 MB each.
Pick "img tag" to paste into an HTML page or email, "CSS" to use it as a background image in your stylesheet, or "Data URI" if you need the complete string to place somewhere else.
Related tools
Base64 & URL Encoder / DecoderEncode and decode Base64 and URLsPhoto info viewer (EXIF)See which camera took a photo, when and whereSVG optimizerMake SVG files smaller without changing the pictureRemove hidden photo infoRemove hidden date, location info before postingCompress ImageMake images smaller, keep them sharpConvert Image (JPG, PNG, WEBP)Convert between JPG, PNG and WEBPHEIC to JPGTurn iPhone .HEIC photos into JPG or PNGPhoto collage makerCombine several photos into one grid imageFavicon GeneratorMake website icons from your logo