Image ↔ Base64
Convert an image file to a Base64 data URI, or preview Base64 as an image, in this browser. The result updates as soon as the file is read — nothing is uploaded.
Image to Base64
Upload an image and get its Base64 string.
Drag & drop your image here
or click to browse from your device
Base64 Output
Base64 to Image
Paste a Base64 string and get your image back.
Result Image
Your image will appear here
Why use our Image Base64 tool?
Fast, simple, and local: a file becomes a data URI, or a pasted string becomes pixels, without an upload or an extra app.
No Installation
Works directly in your browser — FileReader and a local preview, no plugin.
Secure & Private
Your data never leaves your device. Close the tab to drop the string from memory.
Works Everywhere
Use the same two cards on a phone or a desktop. Nothing to install.
Popular Use Cases
Embed Images in HTML
Inline a small icon with a data URI so the page does not fetch a second image file.
API Integration
Put a thumbnail in a JSON payload when the API expects Base64 instead of multipart.
Save to Database
Store a tiny graphic as text when you cannot keep a blob column or object store.
Email Attachments
Embed a logo in HTML email that some clients will not fetch as a remote image.
Data URIs
CSS backgrounds and favicon-sized assets that must ship inside the stylesheet.
Your data stays private
The file is read in this browser. Nothing is uploaded or stored on a server. Close the tab to drop the data URI from memory.
About converting images and Base64 in the browser
Image ↔ Base64 turns a file you pick on this device into a data URI (data:image/…;base64,…) plus the raw Base64 payload, or it previews a pasted data URI as an image. Encoding and decoding run in this tab with the FileReader and a local preview. Nothing is uploaded to Toolora. The public URL stays /tools/image-base64 — we do not rename shipped paths. Use Image → Base64 for CSS backgrounds, small icons in HTML email, or a README that must not depend on a second request. Use Base64 → Image when someone sent you a data URI and you want to see the pixels.
Large photographs make huge strings. A data URI is not a CDN, not an image host, and not a way to bypass file-size limits on a form that still has to parse the HTML. Prefer a real file for anything bigger than an icon. We do not persist the result: closing the tab drops the data URL from memory. Invalid Base64 is rejected instead of rendering a broken image. MIME is taken from the data URI when present; a bare Base64 blob is treated as PNG for preview.
Related: Base64 Encode / Decode for text, not pixels. Image Compressor, Resizer, Converter, and Cropper when the problem is a photo file rather than a string. QR Code Generator and Barcode Generator create graphics instead of encoding one you brought. Hash Generator if you needed a digest of the bytes, not a data URI.
How to convert an image to Base64
Encode a file
On Image to Base64, drag a JPG, PNG, WebP, BMP, or GIF (max 10MB) or click Choose Image. The data URI fills as soon as the file is read.
Copy the string
Copy the Base64 output for CSS, HTML, or JSON. Encoding has no Run button.
Preview and download
Paste a data URI or raw Base64 on Base64 to Image. The preview updates as you type. Download the pixels as JPG, PNG, or WebP.
Stay local
Encoding stays in this tab. Related: Base64 Encode for text, Image Compressor for file size.
Related tools
Base64 Encode
Encode text to Base64 (UTF-8 safe). Type or paste below — the result updates as you type.
Image Compressor
Shrink a JPEG, PNG, or WebP image in your browser with a quality control. Nothing is uploaded.
Image Converter
Convert an image to PNG, JPEG, or WebP entirely in your browser. Nothing is uploaded.
QR Code Generator
Create a QR code from a URL, text, Wi-Fi network, or contact details. The code updates as you type — nothing is uploaded.
Barcode Generator
Create a Code 128, Code 39, EAN, UPC, ITF-14, or Codabar barcode. The image updates as you type — nothing is uploaded.
Hash Generator
Generate SHA-1, SHA-256, SHA-384, or SHA-512 hashes using various encodings. Hashing is commonly used to verify integrity and fingerprint data.
Image ↔ Base64 FAQ
Use the Image to Base64 card and pick a file (or drop one). The data URI appears as soon as the file is read — encoding has no Run button. Work stays in this browser. Close the tab to drop the string from memory.
Yes. Paste a data URI or a bare Base64 blob in Base64 to Image. The preview updates as you type. Invalid strings are rejected instead of rendering a broken picture. A bare blob is treated as PNG for preview. Download the result as JPG, PNG, or WebP without leaving this tab.
Usually no. Data URIs are for small icons and CSS backgrounds. Large photographs make huge HTML. Use Image Compressor or keep a real file. Related: Base64 Encode is for text, not pixels.