Tools
PDF Tools 34
Image Tools 5
AI Writing 13
Text Tools 13
SEO and websites 22
YouTube and video 13
Calculators and converters 17
Developer Tools 13
Other tools 2
Scanner Blog
Language

Image to Base64 Converter

Convert an image from a URL into a Base64 Data URI string.

Supports PNG, JPG, WebP, GIF and SVG straight from your device.

Related tools

All tools in this group
Illustration of an image turned into Base64 text

An image inside your code instead of a separate file

A small icon you want inside a CSS file with no extra file, a photo that has to travel inside a JSON request to an API, a logo for a single HTML page that must work offline: in each case the image has to become Base64 text. Jood's tool hands you that text ready to use, in two forms.

How to use it

  1. Choose an image from your device: PNG, JPG, WebP, GIF or SVG.
  2. Or paste the address of an image that is online instead of choosing a file.
  3. Click "Start Now", then copy the form you need.

Two forms of output

  • The full Data URI: it starts with data:image/png;base64, and goes straight where an image address would go, in an HTML src attribute or a CSS url().
  • The raw Base64: just the characters with no prefix, the form most APIs and databases expect.

A preview of the image and its type appear above the result, so you can check you converted the right file.

When Base64 is a good idea, and when it is not

Encoding makes the data about a third bigger: a 30 KB image becomes roughly 40 KB of text. That suits icons and small logos, where you save a request to the server. Large images are better left as files, because the browser caches a file and reuses it, while embedded text is downloaded again with every page.

Watch out with email: many mail programs, Gmail included, do not show images embedded this way.

Limits and privacy

An image from your device can be up to 8 MB, and one from a web address up to 5 MB. Your browser reads the file and sends it to Jood's server, which checks that it really is an image; nothing is kept afterwards. Before converting, shrink the picture with compress image or resize image to get a shorter string. For the reverse, use Base64 to image.

FAQ

الأداة تطلب Image URL. إن كانت صورتك على جهازك فارفعها أولاً إلى موقع أو استضافة لتحصل على رابط عام.
Base64 يمثل كل 3 بايتات بـ 4 أحرف، فيزيد الحجم بنحو 33%.
نعم، بأداة Base64 to Image Converter دون أي فقد في Quality.