Image to Base64 Converter
Encode images to Base64 strings or decode Base64 back to images — instantly in your browser.
Drop your image here
or click to browse
JPG, PNG, WebP, GIF, SVGHow to Use
Choose a Tab
Select "Image → Base64" to encode an image file, or "Base64 → Image" to decode a Base64 string back into a viewable image.
Upload or Paste
For encoding: drag and drop your image or click to browse. For decoding: paste your Base64 string (with or without the data URL prefix) into the text area.
View the Result
The Base64 string or decoded image preview appears instantly. Character count and file size are shown for encoded results.
Copy or Download
Click Copy to copy the Base64 string to your clipboard, Download .txt to save it as a text file, or Download Image to save the decoded image.
Frequently Asked Questions
Base64 encoding converts binary image data into a text string made up of ASCII characters. This allows images to be embedded directly inside HTML, CSS, JSON, or other text-based formats without needing a separate image file.
Yes. The output includes the full data URL (e.g. data:image/png;base64,...) which you can use as an src attribute in an <img> tag or as a background-image value in CSS. This is useful for small icons or when you want to avoid extra HTTP requests.
Yes. Base64 encoding increases the data size by approximately 33%. A 100 KB image becomes roughly 133 KB as a Base64 string. This is a trade-off for the convenience of embedding images inline in text documents.
Any image format your browser supports can be encoded, including JPG, PNG, WebP, GIF, and SVG. The resulting data URL preserves the original MIME type. For decoding, any valid Base64-encoded image data URL is supported.
No. All encoding and decoding is done entirely in your browser using the FileReader API and JavaScript. Your images and Base64 strings never leave your device.