Base64 to JPG
Use our base64 to jpg tool to encode or decode text quickly. Paste your input, convert instantly, then copy the output for quick checks.
Base64 to JPG
SIMILAR TOOLS
What the Base64 to JPG tool does
You have a Base64 string that is a JPG photo, and you want the actual photo file back. Paste the Base64 in, press Convert, and the image appears in a preview, ready to download as a .jpg, with HTML and CSS snippets thrown in if you need them.
It runs in your browser, so the image never gets uploaded anywhere.
How to use it
- Paste your Base64. The bare string is fine, and a full
data:image/jpegURI works too. - Press Convert. The photo shows in the preview.
- Download it as a JPG, or copy the HTML or CSS version.
Does this turn a PNG into a JPG? No
This is the thing to be clear about, because the name can mislead. This tool does not change one image format into another. It takes the Base64 you give it and hands it back to you as a JPG file, but it does not re-compress the picture or rebuild it as a true JPEG. It is a decoder, not a converter.
What that means in practice: the Base64 you paste should genuinely already be a JPG. If you feed it Base64 that is actually a PNG, you will get a file named with a .jpg ending whose insides are still a PNG, which can confuse whatever you open it with. If what you truly want is to turn a PNG into a real JPG, that is a different job, an actual image conversion that re-encodes the picture, not something a Base64 decoder does. Use this for what it is good at: getting a JPG that was stored as Base64 back into a proper file.
When you would reach for it
The usual case is a photo that has been living as text somewhere. An API hands you a product image as a Base64 string, a JSON response carries a photo in a field, or a database column stored a picture encoded rather than as a file. JPG is the everyday photo format, so a fair amount of that encoded image data is JPG. When you need the actual photo out of the string, to view it, save it, or pass it on, this is the quickest way to get it back.
How it works
The tool wraps your Base64 in a JPG data URI, points an image at it so the browser decodes and shows the photo, and offers that same data back as a downloadable file. The full walk-through, including why you sometimes need to state the image type, is on the Base64 to Image page.
Questions people ask
How do I convert a Base64 string to a JPG?
Paste the Base64 and press Convert. If the string is a JPG, the photo appears in the preview and you can download it as a .jpg file.
Can I use this to change a PNG into a JPG?
No. It decodes Base64 back into a file without re-encoding the image, so it cannot turn one format into another. For a real PNG to JPG change you need an image converter that rebuilds the picture as a JPEG.
Does it lose any quality?
No. It only unpacks the existing data, so the photo is exactly what was encoded. Any compression in a JPG happened when the photo was first saved, not here.
Where do these Base64 JPGs usually come from?
Most often from an API, a JSON payload, or a database that stored a photo as text rather than as a file. This gets the photo back out as a usable image.
References
- Masinter, L. (1998). RFC 2397: The "data" URL scheme. Internet Engineering Task Force (IETF). https://www.rfc-editor.org/rfc/rfc2397
- Josefsson, S. (2006). RFC 4648: The Base16, Base32, and Base64 Data Encodings. Internet Engineering Task Force (IETF). https://www.rfc-editor.org/rfc/rfc4648
Bhabin Khadka is a software engineer and graduate student at the University of New England with experience in backend development and scalable systems. He has a particular interest in file systems and the kinds of technical utilities that depend on dependable handling of structured data. At Eon Tools, he reviews file and document tools, as well as encode and decode tools.