1. To convert an image to Base64 encoding, click the "Select image..." button, upload the image to convert, and the Base64 encoding is generated automatically (If the image is larger than 2M, please wait 3-5 seconds)

2. To convert a Base64 encoding into an image, paste the base64 encoding in the input box below and click the "Base64 to image" button to get an image

Select image...

Introduction to online image to base64 and base64 to image tools

1. Supports PNG, GIF, JPG, BMP and ICO image formats.

2. Converting images to Base64 encoding lets you quickly insert them into other web pages or editors without uploading a file. This is extremely convenient for small images, since you no longer need to find somewhere to save them.

3. Assuming the generated code is "data:image/jpeg;base64, .....", you only need to copy it all, then paste this code as the address when inserting the image.

4. Use in CSS: background-image: url("data:image/png;base64,,/9j/4AAQSkZJRgABAgEAYABgAAD/7gAOQWRvYmUAZAAAAAAB...");

5. Use in HTML: <img src="data:image/png;base64,,/9j/4AAQSkZJRgABAgEAYABgAAD/7gAOQWRvYmUAZAAAAAAB..." />

6. Image to Base64 conversion, an essential tool for mobile development, HTML5 and CSS3, the CSS DataURI Base64 tool.

7. Converting images to base64 code is commonly used for small images in web design: it not only reduces the number of image requests (by embedding them in js and css code) but also prevents image 404 errors caused by relative path issues.

Recently used:

How to use

This tool belongs to the “Encryption & encoding” category.

  1. 1Pick an algorithm: reversible ones are AES, DES and RC4; one-way digests are MD5 and the SHA family.
  2. 2Enter the text plus your key or salt. Encrypting twice with the same key must give the same result.
  3. 3Copy the output into your code. When comparing digests, match case and the 16/32-bit variant first.

Your input is processed locally in the browser whenever possible. We do not store it.

Frequently asked questions

Can MD5 be decrypted?

No. MD5 is a one-way digest — you can compare it, never reverse it. So-called "decryption" is a rainbow-table hit.

Why do two runs give different results?

Salts, random IVs, or a different case or source encoding all change the output. Normalise to UTF-8 before comparing.

Is it safe to paste a real key here?

Use it for learning and format checks. Generate and store production keys server-side; never paste a live secret into a web page.