Image to Base64
Encode any image as a Base64 data URL for embedding in HTML, CSS or JSON — or paste a Base64 string / data URL and turn it back into a viewable, downloadable image. The mime type (PNG/JPEG/WebP/GIF) is detected automatically. Nothing is uploaded.
Your files never leave your device. All processing happens on your device. No uploads, ever.
How to use Image to Base64
- 1
Pick encode or decode
Choose the direction you need.
- 2
Upload or paste
Upload an image to encode, or paste Base64 to decode.
- 3
Copy or download
Copy the data URL, or download the reconstructed image.
Encode image to Base64
Upload an image and get its data URL. Useful for embedding small images directly into code without a separate file request.
Decode Base64 to image
Paste a Base64 string or a data:image/... URL. The tool detects the format, previews the image and lets you download it.
Private by design
Encoding and decoding happen entirely in your browser. Your image never leaves your device.
Frequently asked questions
What is a Base64 data URL?
A data URL embeds an image directly in text using the prefix data:image/...;base64,... It can be used in HTML src, CSS url() or JSON without a separate file.
Do you detect the image format when decoding?
Yes. The PNG, JPEG, WebP and GIF formats are recognised automatically from the file signature, or read from the data URL prefix if present.
Is my image uploaded anywhere?
No. The conversion happens entirely in your browser; the image never leaves your device.
More images tools
Background Remover
Client-SideRemove, replace or blur the background of any image in seconds. Instant solid-background mode plus on-device AI for complex shots — nothing is ever uploaded.
Image Dimensions Checker
Client-SideCheck the pixel dimensions, aspect ratio, megapixels, format and DPI of a JPG or PNG in one click.
Image Compressor
Client-SideCompress an image to a target file size such as 20, 50 or 100 KB, right in your browser. Files never leave your device.
Image Converter (JPG / PNG / WebP)
Client-SideConvert images between JPG, PNG and WebP in your browser. Adjustable quality for lossy formats, 100% on-device.
Image Cropper
Client-SideCrop an image with a draggable, resizable box and save as JPG or PNG. Crop aspect presets included, 100% in your browser.
DPI Converter
Client-SideChange the DPI metadata of a JPG or PNG to 72, 96, 150, 200, 300 or 600 — without resampling a single pixel.
Related tools
Image Resizer
Client-SideResize an image to exact pixel dimensions in your browser. Aspect ratio is preserved automatically when you set one side.
Image Compressor
Client-SideCompress an image to a target file size such as 20, 50 or 100 KB, right in your browser. Files never leave your device.
Last updated 7 August 2026