Free · No upload · Runs in your browser

Base64 to JPG / JPEG Converter

Paste a Base64 string or full data URI to preview the image instantly and download it as a JPG file — smaller and ready for the web.

100% client-side. Nothing is uploaded — decoding happens in your browser.

Base64 to JPG, explained

Paste any Base64 image string — PNG, GIF, WebP, BMP, or an existing JPEG — and this page returns a real .jpg file. The step in between is not a container swap. The decoded pixels are drawn onto a canvas and pushed back through the browser's own JPEG encoder at quality 0.92, so what lands in your downloads folder is a freshly built JPEG, not the bytes that were hiding inside the string. That single detail explains most of the behaviour described on this page.

JPG is a lossy format. It throws away colour detail the eye is unlikely to notice and stores the rest compactly. For photographs, gradients, and anything with soft shading, that trade is heavily in your favour: a Base64 PNG of a camera shot is often several times the size of the same image saved as JPEG. For flat artwork, screenshots of text, and diagrams with hard edges, the same trade works against you, because the compression artifacts land exactly where sharp boundaries used to be.

When a JPG target makes sense

  • Photographs and natural scenes. Continuous tone is what the format was designed for.
  • You need a smaller file for delivery. Useful for web pages, email attachments, and upload limits.
  • Nothing in the image is transparent. JPG has no alpha channel, so transparency has to be resolved before saving.
  • The consumer expects .jpg. Some upload forms, print services, and older desktop software still reject PNG or WebP outright.

If the source is a logo, an icon, a screenshot of code, or a chart with thin lines, keep it in PNG instead. Base64 to PNG preserves both transparency and crisp edges, and PNG compression handles large areas of identical colour well.

What you can paste

  • A full data URI — for example, data:image/png;base64,iVBOR... or data:image/jpeg;base64,/9j/....
  • A bare Base64 body — the source format is detected from the decoded bytes before conversion.
  • A string with line breaks — whitespace from wrapped Base64 is ignored rather than rejected.

The declared MIME type in a data URI is a hint, not a guarantee. Plenty of strings in the wild are labelled image/png while actually carrying JPEG bytes, usually because something upstream guessed. This decoder looks at the decoded content, so a mislabelled header does not break the conversion. If a string fails outright, the usual causes are a truncated tail, a missing padding character, or characters lost in a copy-paste through a chat client.

What quality 0.92 actually means

The canvas encoder is asked for JPEG at 0.92, on a scale where 1.0 is the least destructive setting the browser offers. In practice 0.92 sits in the range most people stop noticing: fine grain in skies and skin stays intact, and file size is well below what 1.0 produces. It is not a magic number, and it is not a quality guarantee — each browser ships its own encoder, and Chrome, Safari, and Firefox do not necessarily produce byte-identical output at the same setting.

If you need a different balance, the honest route is to save at this setting, check the result, and if the file is still too large, downscale the pixel dimensions before encoding. Reducing width by a third usually cuts more bytes than dropping quality from 0.92 to 0.8, and it costs less visible detail. Dropping quality alone tends to introduce blockiness around edges long before it makes a meaningful dent in size.

Transparency has nowhere to go

JPEG stores three colour channels and no alpha channel, so every pixel must end up opaque. This page draws the decoded image onto a solid white canvas before encoding, which means transparent regions in a PNG source become white in the saved file. A logo cut out on a transparent background will look correct on a white page and wrong on anything else.

There is no setting here that changes the fill colour, and that is deliberate — a partially configurable background tends to produce files that look fine in the preview and wrong wherever they are actually used. If the transparency is load-bearing, do not convert. Keep the alpha channel instead, or use Base64 to WebP if you want a smaller file that still supports transparency. If you genuinely need a JPEG with a specific backdrop, composite the image onto that colour first and then run the result through here.

Metadata does not survive the round trip

A canvas re-encode writes pixels, not containers. EXIF, IPTC, XMP, ICC profiles, thumbnails, and maker notes from the original file are all dropped, because the encoder never sees them. For a photo pulled off a phone, that means GPS coordinates, capture time, camera model, and orientation flags are gone from the output.

Most of the time this is the outcome you want: the file gets smaller, and location data stops travelling with an image you are about to publish. It is also the reason orientation can flip. If the source relied on an EXIF rotation flag rather than rotated pixels, the browser usually applies the rotation while decoding, so the saved JPEG is upright — but a decoder that ignores the flag will not be. If stripping metadata is the actual goal rather than a side effect, removing photo metadata covers the dedicated workflow and what each field means.

.jpg and .jpeg are the same format

The two extensions describe one codec. .jpeg is the older four-character spelling, kept alive by conventions in some software; .jpg is the three-character form that most filesystems and web servers settled on. Nothing about the bytes changes. This page names the download decoded.jpg, and renaming it to .jpeg afterwards is harmless. Going the other direction — turning a JPEG file into a data URI — is handled by JPG to Base64.

Private by design

Decoding and encoding both happen inside the tab. The string is turned into an image element locally, drawn to a canvas, and encoded by your browser; nothing is posted to a server, and there is no upload step to forget about. That makes the page usable for internal screenshots, unreleased artwork, and documents that should not sit in someone else's temporary storage.

Frequently asked questions

How do I convert a Base64 string to a JPG?

Paste the Base64 string or full data URI into the box and click Convert to JPG. The source image is detected automatically and exported as a real .jpg file.

Does JPG keep transparency?

No. JPG has no alpha channel, so any transparent areas are filled with a solid background (usually white) in the saved file. Use PNG if you need transparency.

Is the decoder private?

Yes. Decoding happens entirely in your browser. Nothing is uploaded, so your data stays on your device.