Image to Base64
Turn an image into a Base64 data URL with ready-to-paste CSS, HTML and Markdown, or paste Base64 to get the image file back.
Runs in your browserNothing uploadedWorks offline
Loading Image to Base64Runs on this device. Nothing is uploaded.
Questions
Why is the Base64 bigger than the file?
Base64 writes every 3 bytes as 4 characters, so the text is about a third larger than the file. It suits small icons and images; large photos are better linked as files.
What can I paste to decode?
A full data URL, raw Base64, or either inside CSS url("...") or an <img src="..."> tag. Spaces and line breaks are ignored, and URL-safe Base64 works too.
Is the image uploaded to be encoded?
No. Encoding and decoding happen in this tab.
Related tools
All images toolsDeveloperBase64 encode and decodeEncode text or any file to Base64 and decode Base64 back to text or the original file, with a URL-safe option.Imagesjpeg png webpEXIF viewerSee the camera, lens, settings, date and GPS location hidden in a photo, plus every EXIF, XMP and IPTC field, without uploading it.Imagespng jpeg webpImage to text (OCR)Pull printed text out of screenshots, photos and scans with Tesseract OCR running in your browser, with a confidence score for each image.Imagespng jpeg webpRemove backgroundCut the subject out of a photo with an AI model that runs in your browser, then save a transparent PNG or put it on a solid colour.Imagesjpeg png webpRemove EXIF and locationStrip GPS location, camera details and other hidden metadata from JPG, PNG, WebP and HEIC photos, without re-encoding, and see what was removed.Imagessvg+xml svgSVG optimizerShrink SVG files with SVGO, using safe defaults and clear toggles, and compare the before and after size and look side by side.