Image to Base64 Converter
Convert an image to a base64 data URL, or decode a base64 string back to an image file. Useful for inline CSS, JSON payloads, and email signatures.
Drag, drop, paste, or browse
JPG, PNG, WEBP, GIF, AVIF, and HEIC up to 50 MB. Paste from clipboard with Ctrl+V.
Image ↔ Base64
Encode an image as a base64 data URL, or paste base64 to download an image.
Upload an image to encode as base64.
JPG, PNG, WEBP, GIF, AVIF, SVG, and iPhone HEIC accepted. HEIC is decoded locally to JPG before encoding.
Image to Base64 online with ImgShifter
Drop an image and this tool encodes it to a base64 data URL you can paste straight into code - the bytes read with FileReader.readAsDataURL and come back as a string prefixed with data:image/png;base64,... A toggle strips or keeps that data: prefix: keep it for an HTML img src or a CSS background-image where the browser renders it directly, drop it when you're storing the raw string in JSON or a backend that stamps the MIME type itself. (Need to go the other way? The Base64 to Image tool decodes a string back to a file.)
Base64 inlining earns its keep on small assets - icons, a single-pixel placeholder, an SVG glyph - where skipping a separate HTTP request beats the roughly 33% size penalty the encoding adds. It's also the way to embed an image in a JSON API payload, an email signature that external image hosts would block, or a self-contained HTML export. Above ~10 KB, or for any image reused in several places, a real cached URL wins; inlined base64 can't be cached separately and duplicates the bytes everywhere it appears.
iPhone .heic files are decoded locally with a WebAssembly module first, then encoded to a data:image/jpeg base64 string that works in every browser and mail client - far more portable than raw HEIC bytes. Nothing uploads at any point: the encode is a local FileReader call. Confirm zero outbound traffic in the Network tab, or pull the network after the page loads.
Related tools
Other ImgShifter tools people use alongside Image to Base64.
Base64 to Image
Paste a base64 string or data URL and download the decoded image. Auto-detects PNG, JPG, GIF, WEBP, AVIF, HEIC, and SVG signatures with a live preview before download.
Compress
Reduce image file size with a quality slider and instant before/after stats. Powered by jsquash MozJPEG, libwebp, and AVIF encoders.
SVG Editor
Edit SVG source live in your browser. Recolor, tweak stroke widths, resize the viewBox, optimize, and export as SVG or PNG.
PNG to JPG
Convert transparent PNG images into lightweight JPG files in your browser.
Frequently asked questions
Short answers for image workflows, privacy, and supported formats.