Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

Image to Base64

Image to Base64 turns a picture into text you can paste into code: a data URI, base64 only, a CSS background, an HTML img tag or Markdown. It runs in your browser.

How to use Image to Base64 online

  1. Add your pictures. Up to ten.
  2. Choose the form. Data URI, CSS, HTML or more.
  3. Check the size. Note the extra third.
  4. Copy the text. Or save it as a file.

Why use this free Image to Base64

  • Data URI
  • Base64 only
  • CSS and HTML forms
  • Markdown form
  • Size figures
  • No upload

Pictures as text

Base64 writes the bytes of a file using only letters, digits and a few signs. A data URI puts that text after a short label, such as data:image/png;base64, so a browser can show the picture without loading a file. Developers use it for small icons in CSS, pictures in an HTML email, or a quick test page.

Five ways to write it

Pick the form you need: the full data URI, the base64 text alone, a CSS background-image rule, an HTML img tag with the width and height filled in, or a Markdown image. The text appears in a box with a copy button and a button that saves it as a text file. The base64-only form can be made URL-safe or broken into lines.

The cost in size

Base64 makes the data about a third bigger: three bytes become four characters. The tool shows the file size, the size of the text and the share. A data URI also cannot be cached on its own, so it suits small pictures. A picture over a hundred kilobytes makes a heavy page, and the tool warns you when you cross that line.

Formats it knows

The tool reads JPG, PNG, WebP, GIF, ICO, AVIF, BMP and SVG, and works out the type from the first bytes of the file, not from its name, so the label in the data URI is right. A file of another type is refused with a message. For SVG, consider writing the markup straight into the page instead, which is often smaller.

Privacy and limits

Up to 10 pictures of up to 10 MB each can be done at once. The files are read in your browser and nothing is uploaded. The reverse step, turning text back into a picture, is done by the base64 to image tool on this site. Check that a picture is allowed on your page before you embed it, as a data URI hides it from some filters.

Image to Base64: frequently asked questions

What is a data URI?
A link that holds the file itself, written as data:type;base64, followed by the text.
Why is the text bigger than the file?
Base64 adds about a third.
Which pictures can I convert?
JPG, PNG, WebP, GIF, ICO, AVIF, BMP and SVG.
Can I get a CSS rule?
Yes, choose the CSS background-image form.
Should I embed big pictures?
No. Over 100 KB a normal image file is better.
Is my picture sent to a server for encoding?
No. It is encoded in this tab.

Related searches for Image to Base64

  • Image to Base64 online
  • free Image to Base64
  • Image to Base64 online free
  • Image to Base64 without watermark
  • Image to Base64 no upload
  • Image to Base64 for mobile
  • Image to Base64 without sign up
  • convert image to base64
  • image to base64 converter
  • Image to Base64 – Developer & Web Tools

Image to Base64 is a free online tool on MAITBOX, in the Developer & Web Tools group. It runs in your browser, so your files stay on your device and are not uploaded. Accepted formats: JPG, JPEG, PNG, WEBP, GIF, ICO. Limit: 10 MB per file, up to 10 files. No watermark is added to the result. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.

More tools in Developer & Web Tools →

Search tools