Free · no account · browser only
Image to Base64
Turn one image into a Base64 string, a data URI or a ready CSS, HTML or Markdown snippet, and copy it in one click.
Your image stays in your browser and is not sent to a NixRey server.
- Paste-ready snippetsGet raw Base64, a data URI, CSS, an HTML img tag, Markdown or JSON.
- See the real sizeCompare the file size with the Base64 size before you paste it.
- Handles big imagesImages over 1 MB encode in the background, up to 50 MB each.
Image
Drop an image here
Supports JPG, PNG, WebP, GIF, SVG, and more
or paste from clipboard Ctrl / ⌘ V
Output
Line wrap
Use 76 characters for email.
Line wrap only applies to Raw output.
Size and download
/image-to-base64
How it works
- 1
Drop an image onto the drop zone or choose one.
Any image your browser can open works, including iPhone HEIC photos.
- 2
Pick the output you need, such as Data URI or CSS.
Raw, Data URI, CSS, HTML, Markdown or JSON, ready to paste.
- 3
Check the size line, and compress the image first if it is large.
Base64 adds about a third to the file size.
- 4
Press Copy or Download.
Download saves a text file named after your image.
Frequently Asked Questions
Common questions about Image to Base64.
What is Base64 encoding?
Base64 is a way to represent binary data (like images) as a text string. It is commonly used to embed images directly in HTML, CSS, or JSON without needing a separate file reference.
Should I include the data URI prefix?
Include it when embedding in HTML (e.g. <img src="data:image/png;base64,...">). Use raw Base64 only when the receiving system expects just the encoded data without the prefix.
What formats are supported?
It works with any image your browser can read, such as JPG, PNG, WebP, GIF and SVG. iPhone HEIC photos are converted to JPEG first. The MIME type is detected from the file.
Will the Base64 string be very long?
Yes. Base64 makes the data about 33% larger, so a 100 KB image becomes roughly 133 KB of text. The size line under the output shows both numbers.