Image to Base64
Turn a picture into Base64 or a data URL you can put straight into HTML, CSS or JSON.
Nothing leaves your device.Free and unlimited, no account needed. This tool works in your browser, so nothing is uploaded.
Convert image to Base64 (data URL)
Turn a JPG, PNG, SVG, WebP or GIF picture into a data URL to put straight into HTML, CSS or JSON. Free, and your picture stays on your device.
- 1
Choose a picture.
- 2
Choose a data URL or plain Base64.
- 3
Copy the text into your page or code.
Questions
How do I use the data URL?
Put it where the picture's address would go: <img src="data:image/png;base64,…"> in HTML, or url("data:image/png;base64,…") in CSS.
Should every picture be a data URL?
Only small ones, such as icons. Base64 is a third larger than the picture, and the browser can't keep it apart in its cache.
Is Image to Base64 free?
Yes, and as often as you like. It works in your browser, so there is nothing to sign up for.
What happens to my files?
They stay on your device. Everything is worked out in your browser, so nothing you type or choose is uploaded.
Do I need to install anything?
No. It works in the browser on any computer, tablet or phone.
Can I use Image to Base64 from my own code?
You won't need to: every programming language has hashing, Base64 and URL encoding built in. This page is for quick jobs by hand.
Other tools
- Base64 encode and decodeTurn text or a file into Base64, or Base64 back into text or a file.Nothing is uploaded
- Hash generatorWork out the MD5, SHA-1, SHA-256 and SHA-512 hashes of text or a file, and check a checksum.Nothing is uploaded
- URL encode and decodeTurn spaces and symbols into %-codes for a web address, or back again.Nothing is uploaded