Encode an image file to a Base64 string, or decode Base64 back to an image.
Updated
/ 5 - Be the first to rate this tool Thanks for rating!
Verification failed - please try again.
Quick check
Please verify you're not a robot to submit your rating.
Give feedback
Tell us what you think about Convert an image to Base64 for free.
Drop an image here, or click to upload
PNG, JPG, or WebP
Your decoded image will appear here.
- Runs entirely in your browser — your image is never uploaded
- Encode an image to Base64, or decode a Base64 string back to an image
- Free, no account required
How it works
-
1
Upload an image to encode, or paste a Base64 string to decode.
-
2
The conversion happens instantly in your browser.
-
3
Copy the Base64 string, or preview the decoded image.
-
4
Use the result directly in your HTML, CSS, or JSON.
Why use this tool
Every image task, one place
Resize, compress, convert, crop, rotate, filter, and watermark — no need for a heavyweight photo editor.
100% private, always
Every tool runs entirely in your browser using the canvas API — your images are never uploaded to a server.
Works on any device
Runs in the browser on Windows, Mac, Linux, iOS, and Android — nothing to install, nothing to trust but the tab.
Instant results
No queues and no desktop app to wait on — edits and conversions finish the moment you make them.
Convert to any format
Move between JPG, PNG, WebP, and ICO — output stays sharp, with quality settings when you need control.
Free, always
Every tool here is free to use, with no watermarks, size limits, or forced trial period.
Frequently asked questions
It allows developers to embed images directly within HTML, CSS, or JSON files, eliminating the need for separate HTTP requests.
Base64 represents binary data with standard text characters, expanding the overall data footprint by about 33%.
Yes, SVGs encode perfectly, though sometimes inline SVG code is more efficient than Base64 depending on the graphic.
The tool provides a ready-to-use Data URI string that you can paste directly into a background-image property.
While technically unlimited, embedding massive multi-megabyte strings can severely bloat your code and slow down browser parsing.
From the blog
Responsive Images Done Right: srcset, Sizes, and the Widths That Matter
Shipping one giant image to every device is the easiest performance mistake to make. Here is how to pick a small set of widths, wire up srcset and sizes correctly, and stop guessing.
Understanding Image Metadata: EXIF, Privacy, and Performance
Every photo you take contains hidden metadata. Discover how to read EXIF data, protect your privacy by stripping location tags, and optimize files for faster loading.
The Art of Cropping and Rotating: Framing Images for Web and Social Media
A complete guide on how to frame, crop, and rotate images to match aspect ratios for social media posts, headers, and web layouts without distortion.
Recently viewed
Related tools
Convert an image to a favicon (ICO) for free
Turn a square image into a multi-size .ico favicon file, right in your browser.
Add a watermark to an image for free
Overlay repeating or single text watermarks on an image, right in your browser.
Chain image edits: resize, compress, convert and more
Build a chain of image steps (resize, crop, rotate, compress, convert, watermark) and run it on one or many images at once, right in your browser.
Resize an image to Instagram post size for free
Fit or fill an image to the 1080×1080 Instagram post size, with drag-to-reposition and zoom, right in your browser.
Convert JPG or PNG images to PDF for free
Combine one or more images into a single PDF document, right in your browser.
Convert JPG to PNG for free
Convert a JPG image to lossless PNG right in your browser.
Format and minify JavaScript online
Pretty-print or minify JavaScript instantly in your browser, correctly handling strings, template literals, regex, and comments.
Format and validate JSON online
Paste JSON to pretty-print, minify, and validate it instantly in your browser.
Validate JSON against a JSON Schema
Paste a JSON document and a JSON Schema to see every validation error with its instance path. Supports draft 2020-12 and draft-07, entirely in your browser.
Generate TypeScript interfaces and PHP classes from JSON
Paste JSON and get TypeScript interfaces or PHP classes with typed properties, including nested objects and arrays, instantly in your browser.
Decode a JWT online
Paste a JSON Web Token to instantly view its decoded header and payload in your browser.
Build and sign a JWT online
Build and HMAC-SHA256-sign a JWT from a header, payload, and secret, instantly in your browser.