Image to Base64 Converter
Convert images to a Base64 (data URI) string and copy ready-to-use <img> tag and CSS background snippets with one click. Or paste a Base64 string to restore and download the image. Everything runs in your browser - your images are never uploaded.
Drag & drop
or
Ctrl+V to paste a screenshot directly
JPEG, PNG, GIF, WebP, SVG, ICO (max 10MB) / iPhone photos (HEIC) are converted to JPG first
How to Use
Choose a direction
Use "Image → Base64" to encode an image into a data URI, or "Base64 → Image" to restore a data URI back into an image.
Provide an image or Base64
Drag & drop, select a file, or paste with Ctrl+V. For decoding, paste the Base64 string into the text box.
Copy or save the result
Copy the data URI, <img> tag, or CSS snippet in one click. Restored images can be downloaded directly.
About the Image to Base64 Converter
An online tool that encodes image files into a Base64 "data URI" string. A data URI lets you embed an image directly into HTML or CSS, reducing HTTP requests and speeding up loading of icons and small images. You can also paste a Base64 string or data URI to restore and download the original image. All processing happens entirely in your browser (JavaScript), so your images are never sent to any server.
Features
- Two-way conversionEncode images to Base64 and decode Base64 back to images - both in one tool.
- Copy-paste readyCopy the data URI, <img> tag, and CSS background snippet with a single click.
- Ctrl+V paste supportPaste screenshots or copied images with Ctrl+V (Cmd+V) and convert instantly.
- Browser-only processingEverything runs locally in your browser. Your images are never uploaded to a server.
Use Cases
- Embed small icons and logos directly in CSS/HTML
- Inline images in HTML emails or web fonts
- Inspect Base64 images inside API JSON responses
- Save a data URI image as a file
- Speed up pages by reducing HTTP requests
FAQ
Are my images uploaded to a server?
What is a Data URI (data URL)?
Does Base64 change the file size?
Which image formats are supported?
Do I need a MIME type to decode Base64 back to an image?
Does it work on smartphones?
Feedback
Missing a feature, or getting a result that looks wrong? Let us know — we improve our tools based on your feedback.