Image to Base64
Turn an image into Base64 text and a data URI. Free.
or drop it hereor drop it anywhere on this page
- Free
- No limits
- No sign-up
Why POW
Four ready forms
Base64, data URI, HTML img tag and CSS, each with its own Copy button.
Exact bytes
The text is your file as it is. Nothing is squeezed or changed.
Free, no sign-up
No account, no email and no limit on how often you use it.
How to convert an image to Base64
- 1
Choose an image
Tap Choose an image, or drop the picture on the page.
- 2
Convert
Tap Convert to Base64. Four boxes show the text, each ready to copy.
- 3
Copy or download
Tap Copy beside the form you want, or Download to save a text file ending in -base64.txt.
Turn an image into Base64 text
POW Image to Base64 turns a picture into Base64 text. Base64 writes a file as plain letters and numbers, so you can paste it straight into a web page, a style sheet, an email or a data file. Choose an image and you get four forms ready to copy, including a data URI.
What is a data URI
A data URI puts the whole picture inside a web address, starting with data:image/png;base64 and then the text. You can use it as the source of an image, so the page needs no second file to load. It is handy for small icons, email templates and single-file pages.
Four forms, each with Copy
The Base64 box holds the plain text. The Data URI box adds the type in front. The HTML img tag is ready to paste into a page and includes the picture width and height. The CSS box gives a background-image line. Tap Copy beside the one you need.
The right type, every time
POW reads the real type of the file from its contents, not from its name. So the data URI says image/png, image/jpeg or image/svg+xml correctly, even if the file name is wrong. JPG, PNG, GIF, WebP, AVIF, SVG, BMP and ICO images work.
Your file, byte for byte
The Base64 text is the file exactly as it is. Nothing is squeezed or changed first. Even a HEIC or TIFF file turns into text, though a browser may not be able to show it. If you want a lighter result, use Compress Image first and convert after.
Text is a third larger
Base64 text is about a third larger than the file. A 1.3 MB photo became 1,826,272 characters in our test. So Base64 suits small pictures such as icons and logos. For big photos, a normal image file loads faster.
Long texts
When the text is longer than 400,000 characters, the boxes show only the start, and the page says so. Copy and Download still give you all of it. Download saves the data URI as a text file named after the picture, so logo.png becomes logo-base64.txt.
One image at a time
This tool takes a single picture each time, so the text always matches one file. A file that is not a picture is marked in red with a short reason. To turn many pictures into another format at once, use the converter tools on this site.
Questions
Is POW Image to Base64 free?
Yes. It is free, with no trial, no daily cap and no paid plan behind the Copy and Download buttons.
Do I need an account?
No. There is nothing to sign up for and no email to confirm. Open the page, choose an image and copy the text.
What is Base64?
It is a way to write a file as plain text made of letters, numbers and a few signs. That lets you put a picture inside text, such as code or an email.
What is the difference between Base64 and a data URI?
Base64 is the text alone. A data URI adds a start, such as data:image/png;base64, so a browser knows it is a picture and can show it.
Which image types work?
JPG, PNG, GIF, WebP, AVIF, SVG, BMP and ICO. HEIC and TIFF files also turn into text, even where your browser cannot show them.
Why is the Base64 text so long?
Base64 is about a third larger than the file. A 1.3 MB photo gave 1,826,272 characters in our test. Use it for small pictures.
Does it change my image?
No. The text is the file byte for byte. Nothing is re-compressed, resized or cleaned.
Why do the boxes show only part of the text?
For texts over 400,000 characters, the boxes show only the start so the page stays fast. Copy and Download always give the whole text.
Can I convert many images at once?
No. One image at a time, so the text always matches one file. Run the tool again for the next picture.
Where does the downloaded file go?
Download saves a text file with the data URI inside. A file called logo.png gives logo-base64.txt. Open it with any text editor.
How can I make the text shorter?
Make the picture smaller first. Use Resize Image to cut the pixels, or Compress Image to cut the file size, then convert the result.