Home › Images › Image to Base64 (data URI for HTML and CSS)
Image to Base64 (data URI for HTML and CSS)
Turn a small image into Base64 text you can paste into HTML, CSS or JSON. Free, instant, no sign-up.
- Press Select file and pick your image (up to 2 MB).
- Choose Give me: Data URI (data:image/...), Only the Base64 text, HTML <img> tag or CSS background.
- Press Convert and copy the text.
- Press Select file and pick your image (up to 2 MB).
- Choose Give me: Data URI (data:image/...), Only the Base64 text, HTML <img> tag or CSS background.
- Press Convert and copy the text.
💡 Simple guide · no technical skills needed
When do I need this?
You must put a small picture straight into HTML, CSS or JSON as text.
Good to know
- Use it for small icons only, big pictures make pages slow.
- Base64 is just the picture written as text.
Words explained
- JSON
- A data file used by programs and websites. You only need it if a program asks for it.
Stuck? Press Help in the bottom corner and write your question in any language. You get an answer in seconds, or a real person answers you.
More free tools
Images
For photos and pictures: make them smaller, change the size or type, or copy the text in them.
PDF tools
For when you have a PDF: join, cut, shrink, turn pages, or get the text and tables out of it.
Excel, CSV and lists
For Excel and lists: clean up, join, split, convert or compare them.
Invoices, banking and VAT
For invoices, bank account numbers (IBAN), VAT numbers and bank upload files.
Websites and e-mail
For your website and e-mail: find problems and get the fix in plain words.
Products, customs and cars
For sending goods abroad (customs codes) and checking used cars.
QR codes and barcodes
Make a QR code (link, Wi-Fi, payment) or a barcode in one click.
Live rates and data
Today's numbers from official sources. Nothing to upload, just read.
Text and code tools
For text and code: count words, change capital letters, remove repeats, tidy JSON, make passwords, encode or compare text.
Calculators
For everyday sums: percent, loans, VAT, working days, dates, ages, units and time zones.
Audio and video
For your own video and sound files: get the MP3, make a GIF, cut, shrink or change the format.