Logo

Base64 to JPG

Paste a Base64 string and download it as a JPG — transparency flattened onto white, not black

Paste Base64 or Data URL

Your Logo Comes Back on White, Not Black

You convert a transparent PNG to JPEG and the logo arrives on a black square. Now it is unusable and you are re-exporting from the original. That happens because most converters draw onto an empty canvas, which is transparent black. Our Base64 to JPG tool fills white first.

It is a one-line difference in the code and it saves a genuinely annoying half hour.

How to Decode Base64 to JPG

  1. Paste the string. Header optional — we detect the format either way.
  2. Click Decode to Image. Preview and dimensions appear.
  3. Look for transparency. If there is any, it becomes white on save.
  4. Click Save JPG. Conversion only runs if the source was not already JPEG.

When the string is already a JPEG we skip the canvas entirely and hand you the original bytes. Nothing is re-compressed, so no quality is lost.

What a Base64 JPEG Converter Gives Up

Converting to JPEG is a one-way door. Four things go, and none of them come back:

  • Transparency. JPEG has no alpha channel. Flattening is permanent.
  • Metadata. Canvas rebuilds from pixels, so EXIF and colour profiles are dropped.
  • Animation. A GIF or animated WebP becomes its first frame.
  • A little detail. JPEG is lossy, so every re-save costs something.

We export at quality 0.92, which is high enough that the loss is invisible on photographs. There is no quality slider yet — worth saying plainly rather than letting you assume there is one.

Need any of those four preserved? Use the Base64 to PNG decoder or download the original format from the general Base64 image decoder.

When JPEG Is the Right Choice

Photographs, and not much else. JPEG compresses continuous tone brilliantly — skies, skin, foliage, anything where colour shifts gradually.

It is the wrong choice for screenshots, logos, line art, and anything with text. Its compression smears sharp edges, leaving a visible halo around every letter. In our experience this is the number one reason people come back asking why their image looks fuzzy.

There is a counter-intuitive twist here too. Converting a screenshot to JPEG can produce a larger file than the PNG, because JPEG spends bits trying to describe edges it cannot compress.

Where These Strings Come From

Most JPEG Data URLs we see start life in one of three places: a camera upload endpoint, a canvas-based image cropper, or a database column holding user avatars.

All three tend to hand you a raw payload with no data: header. That is fine — a JPEG always begins with /9j/, which is enough for us to identify it.

Producing strings rather than reading them? The JPG to Base64 encoder reads your photo byte for byte, with no second compression pass.

Frequently Asked Questions

My transparent PNG turned into a white background. Can I get the transparency back?

+
Not from the JPEG — it has no alpha channel to store it in. We paint white behind the image before converting, which is why you got white rather than black. Save as PNG instead if the cut-out matters.

Why white and not black? Other converters give me black.

+
Because an unpainted canvas is transparent black, and most tools just draw over it. We fill white first, since a logo on white is usually recoverable and a logo on black usually is not. It is a small choice that saves a lot of re-work.

What JPEG quality does the conversion use?

+
We export at 0.92, which is high enough that artefacts stay invisible on most images. There is no slider yet, and we would rather say so than pretend the default suits every case. For fine control, convert the file with a dedicated compressor.

Is the output a progressive JPEG?

+
No. The browser canvas only emits baseline JPEG, and there is no API to request progressive. For inline Data URIs it makes no practical difference, since the whole payload arrives at once anyway.

Does the converted file keep EXIF data from the original?

+
No. Canvas rebuilds the image from raw pixels, so camera settings, timestamps, and GPS coordinates are all dropped. Treat that as a feature when you are sharing photos and a problem when you needed the metadata.

Should the file be named .jpg or .jpeg?

+
Either works — they are the same format and every system accepts both. We use .jpg because it is the more common convention. The MIME type is always image/jpeg regardless of the extension.

My screenshot looks soft and smeared after converting. Why?

+
JPEG compression was designed for photographs, and it handles sharp edges badly. Text and UI borders pick up a visible halo, sometimes called ringing. Screenshots belong in PNG.

Can I control chroma subsampling?

+
Not through the browser, no. Canvas exposes only a quality number, and the encoder picks the subsampling itself. If colour fidelity in reds or fine detail is critical, use a desktop encoder.

Why is my converted JPEG bigger than I expected?

+
Usually because the source was a screenshot or line art. JPEG spends bits describing the sharp transitions it cannot compress well, so a graphic can come out larger than the PNG it replaced. Photographs behave the way you expect.

Can I convert an animated GIF string to JPG?

+
You get the first frame only. JPEG has no concept of animation, so everything after frame one is discarded. Keep the original format if the motion matters.

The Short Version

Paste, decode, save. Converting Base64 to JPG is instant, and transparent areas land on white where they are still salvageable.

Keep it for photographs. For screenshots and logos, PNG will look better and often weigh less.

Related Tools You Might Like

Advertisement