Advanced PNG to JPG converterConvert PNG to JPG

Choose what fills the transparent parts, clean the edge, set exactly how the JPEG is written, then see where it lost detail — on this device.

No PNG open yetNothing leaves this device
A cut-out apple, written by this converter: the PNG on its transparency chequer above the diagonal, the JPG on a warm grey matte below it
Choose PNGor drop it herePaste works too (Ctrl+V).

No PNG handy?

Matte whiteQuality 86Edge repair when neededSame pixel size

Free · No sign-up · Your PNG stays on your device

Inside the converter

73 tools in one PNG to JPG converter

Every picture below was written by this converter's own code from a real photograph, and every figure is the size of the file it wrote.

  1. The same cut-out apple written as four JPGs: on white, on page grey, on black and on a brick red taken from its own skin

    01 Matte

    Decide what the see-through part becomes

    A JPEG has no alpha channel, so every clear pixel has to turn into a colour before the file is written. Choose white, page grey, the colour recovered from the cut-out's own edge, a hex value, or press the picture itself and take one of its own colours.

    • White: 46,366 bytes
    • Black: 41,949 bytes
    • Brick red BF5A46, pressed on the apple's skin: 45,421 bytes
  2. The top of a cut-out apple on black at 400%: on the left a pale grey outline, on the right the outline gone after the edge repair

    02 Edges

    Clean the rim before the matte goes under it

    A cut-out made against a white sheet keeps a little of that white in every half-covered edge pixel, and on a dark matte it shows as a pale outline. The repair recolours those pixels from the nearest solid pixel first, then flattens.

    • Left: no repair, pale rim on black
    • Right: 5,270 edge pixels recoloured
    • Shown at 400%
  3. Three 400% crops of an apple's edge on white: soft with a dark ring, hard-cut with stepped pixels, and pulled in two pixels with the ring gone

    03 Edges

    Hard cut, or pull the edge in

    When the soft edge itself is the problem — a dark ring baked into a cut-out, an icon made for another background — the half-covered pixels can be made all-or-nothing at a level you choose, or the visible picture can be pulled in by one to three pixels so the ring goes under the matte.

    • Blend: 51,570 bytes
    • Hard cut at 50%: 54,592 bytes
    • Pulled in 2 px: 50,472 bytes
  4. A green Choice street sign at three JPEG qualities, top to bottom 20, 55 and 90, with blocking visible round the letters at 20

    04 Quality

    A quality number, or a size the file has to fit

    Move the quality and the Save button's byte count follows it: the full-size file is written each time, so the number is the file, not a forecast. Or type a ceiling in kilobytes — and a floor for strict upload forms — and the highest quality that fits is found by encoding, not guessed.

    • Quality 20: 21,693 bytes
    • Quality 55: 40,928 bytes
    • Quality 90: 93,585 bytes
  5. Four 400% crops of the S on a stop sign: 4:4:4, 4:2:2, 4:2:0 and 4:4:4 with lower colour quality, the red edge softening in the colour-reduced versions

    05 Encoder

    Colour detail is a setting, not a surprise

    The precision encoder writes 4:4:4, 4:2:2 or 4:2:0 on request, can give the two colour channels their own quality, and reads what it wrote back out of the frame header. Red on white is where halved colour shows first.

    • 4:4:4: 83,559 bytes, PSNR 41.95 dB
    • 4:2:2: 74,032 bytes, 41.12 dB
    • 4:2:0: 66,917 bytes, 40.28 dB
    • 4:4:4, colour tables at 40: 71,983 bytes, 40.32 dB
  6. A mountain lake decoded from the start of a progressive JPEG: blocky after the first scan, softer after the second, coloured after the fourth, sharp at the end

    06 Encoder

    Baseline or progressive scans

    A progressive JPEG sends a coarse version of the whole picture first and sharpens it in later scans; a baseline one arrives top to bottom. The pixels at the end are the same. The pictures here were decoded from the first bytes of one progressive file.

    • After 15,920 bytes: block averages
    • After 57,233: low brightness detail
    • After 68,622: colour added
    • All 187,840 (baseline: 191,752)
  7. Sticky notes over printed text, as a quality 35 JPEG on the left and its error map on the right, the type outlined in amber where it changed most

    07 Errors

    See exactly where the JPEG changed your picture

    The error map decodes the saved file and compares it with the flattened PNG it came from, pixel by pixel. Blocking shows as squares, ringing as halos round type. A button takes the stage to the worst block at 1:1. The map only ever changes the screen.

    • Quality 35, 4:2:0: 43,290 bytes, PSNR 35.1 dB
    • 10.9% of pixels off by more than 8 levels
    • Quality 90, 4:4:4: 0.17%
  8. Three converted pictures side by side: an apple on white, a pair of leggings on pale blue, and a stop sign that had no transparency

    08 Batch

    A folder at once, with a line for every file

    Drop many PNGs, or a ZIP of them. The matte can be recovered per file, so a logo cut from a dark header and an icon cut from white each get their own. Every row prints its size, sampling, quality and scan type, and the ZIP can carry a receipt.

    • Apple on white: 46,366 bytes
    • Leggings on pale blue: 136,841 bytes
    • Stop sign, no alpha: 83,559 bytes
    Open several PNGs

Real results

One PNG, any background

Left of the line is the PNG with its see-through parts. Right of it is the JPG you download.

  • A dahlia PNG turned into a JPG on white
    On whiteFor forms, shops and documents.
  • A dahlia PNG turned into a JPG on black
    On blackFor dark slides and screens.
  • A dahlia PNG turned into a JPG on your page colour
    On your page colourBlends into a tinted page.
  • A dahlia PNG turned into a JPG on any colour
    On any colourType it or tap it in a screenshot.

The details

What really happens to a PNG

Every transparent pixel has to become a colour. Pick which one.

One edge of a cut-out mark, at 400%

The PNGPart-covered pixels along the edge, over nothing at all.
Flattened as it isThe rim: colour borrowed from the old background, kept.
Edge repaired firstThe same pixels, taking their colour from the artwork.
Every converter produces the middle panel. This one measures the fault, names which of the two kinds it is, and shows you the third panel on your own file at the same magnification before anything is saved. The cells are drawn to explain the fault, not measured from a run.

Three questions, answered on your file

A converter that only asks for a file has decided all three of these for you and mentioned none of them. Here they are in the order the tool puts them, with what each one is measured against.

What colour do the transparent pixels become?
Four grounds, pressed rather than typed: white, the page colour, the colour recovered from the part-covered pixels themselves, and one you type. The picture changes under your finger at preview size, using the arithmetic the export runs at full size. White, held in place is the same converter with that decision already made.
coverage × colour + matte × (1 − coverage), per channel
Is the edge carrying a colour it should not?
Pixels between three and ninety-seven per cent covered are the only place the matte reads as anything. When they carry the colour of whatever the artwork was cut out of, flattening leaves a rim. The band is measured, the fault is named, and the repair borrows from the nearest solid pixel before the matte goes under it. Transparent PNG to JPG opens with the swatch row out and the repair already on.
3% – 97% coverage, inspected at 400%
Should this be a JPG at all?
The JPG is encoded at full size before the question is answered, so the figure compared against the source is the size of the file that would be saved rather than a prediction. If it comes out no smaller, the verdict says keep the PNG, above the export button, with the button still enabled.
output ≥ source, or within 15% on a sharp image

What happens to the transparent parts

JPEG has no alpha channel. A PNG can hold a pixel that is half there; a JPG holds pixels that are there. So every transparent and every part-transparent pixel has to be given an opaque colour, and something has to choose it. Most converters choose without mentioning it. Usually white. Sometimes black, and that is where the black square comes from.

The arithmetic is one line, per channel: the stored colour multiplied by its coverage, plus the matte multiplied by what is left over. On a solid pixel the coverage is one and nothing moves. On the band of part-covered pixels that anti-aliasing leaves along every curve and every letter, the matte shows through in proportion. That band is a pixel or two wide. It is also the only place the choice reads as anything other than a background.

Which is why a mark cut out of a dark panel goes wrong on white. Its part-covered pixels carry the panel's colour, not the mark's, and over white they read as a dirty rim around the shape. Nothing is broken: the file is correct and so is the arithmetic. The repair is to replace the colour in that band with a borrow from the nearest solid pixel, weighted by how little coverage the pixel has, and then run the matte under it.

Converting one file

  1. 1Drop the PNG, or paste it. The file's own first bytes decide what it is; the name is not consulted.
  2. 2Press a swatch. The stage splits along the diagonal: the PNG over its chequer upper-left, the JPG lower-right. Drag the diamond, or use the arrow keys, to walk the cut across an edge; press 1:1 to see it at actual pixels.
  3. 3Leave quality at 86 or move it, or give a kilobyte cap instead. The figure on the button is the size of the file that will be written, measured, not predicted.
  4. 4Press Save JPG. The file goes to your downloads folder from this tab.

Cases where a PNG should stay a PNG

A screenshot of a form is flat colour, hard type and a short palette. PNG stores that with a run-length pass over rows that mostly repeat, and it stores it exactly. JPEG has to describe every one of those hard edges with frequency coefficients, and hard edges need the high ones, which are the first thing quantisation rounds off. The file often comes out larger and the type always comes out softer.

So the tool encodes the JPG first, at full size, and then compares. If the result is not smaller it says so above the button, with the button still working. The comparison is the real file against the real file. An estimate accurate to within fifteen percent is not accurate enough to print beside a byte count and tell somebody to act on it.

The second case has nothing to do with size. If a third of the image is transparent, the transparency is probably doing a job — a logo that has to sit on other people's backgrounds, an icon that goes on a dark bar next week. Converting it spends that, and the colour you choose today is the colour it has from then on.

Things this tool refuses to do

The browser's own encoder cannot ask for full-resolution colour; the precision encoder can.

The canvas encoder in your browser accepts a type and a quality; there is no third argument, so chroma subsampling cannot be requested from it. Switch to the precision encoder under Encoder and 4:4:4, 4:2:2, 4:2:0, one-channel greyscale and progressive scans become real settings. Either way the tool reads the sampling factors back out of the file that was written and prints those.

  • It is built for PNG. A JPEG that arrives under a .png name is handed back untouched, not re-encoded; a WebP, GIF, BMP or AVIF is converted the same way and labelled as what it is; HEIC, TIFF, SVG and PDF are refused with a note saying what the file is.
  • By default it carries no metadata from the PNG into the JPG: not the orientation it applied, not the text chunks, not a copyright field. The PNG's text fields can be copied into a JPEG comment if you switch that on under Output. Some browsers' encoders add a standard sRGB colour label of their own, and the precision encoder writes its own small sRGB profile.
  • An animated PNG opens on its first frame. Under Output you can open any other frame, or save every frame as its own JPG in one ZIP.
  • It does not produce transparency, only remove it, and it does not put a photograph behind a cut-out subject. A matte is a flat fill under the whole frame.

Questions

What people ask about the transparent bit

Why did my PNG turn black?
Because the converter put black under the transparent pixels and did not say so. JPEG cannot store transparency, so a colour has to go there. Some tools default to black, some leave the buffer uninitialised, which comes out black as well. Here the colour is a swatch you press, and white is only where the row starts.
Does the transparency come back if I convert the JPG to a PNG again?
No. The alpha channel is not compressed away, it is spent. Once a transparent pixel has been given a colour, the file holds an ordinary opaque pixel of that colour and nothing distinguishes it from a pixel that was always that colour. Keep the PNG if you might need the transparency later.
Why is there a grey outline around my logo?
The artwork was cut out against a different background from the one you are putting it on. Its part-covered edge pixels still carry the old colour. Turn on the edge repair: those pixels take their colour from the nearest solid pixel instead, and then the matte goes under them cleanly.
Still too big for the form
Give the converter a ceiling instead of a quality: under Quality, pick Fit under a size and type the limit in kilobytes. It writes the full-size file repeatedly, stepping the quality, and keeps the best one that does not go over. When nothing down to quality 1 is small enough, you are told by how much, and a button searches for a smaller pixel size that does fit. Forms that also refuse tiny files get a minimum box.
Is the JPG the same dimensions as the PNG?
Yes, unless you set a size under Size — a long edge in pixels or a percentage, never larger than the PNG — or the file was over the working limit and you agreed to a lighter copy. Either way the output dimensions are printed before you save. JPEG itself stops at 65,535 pixels on a side; past that the format is the limit, not this page.
What happens to the metadata?
The JPG carries nothing from the PNG; some browsers' encoders add only a standard sRGB colour label of their own. An eXIf chunk is read for its orientation value, the rotation is applied, and then the chunk goes with everything else in it. If the PNG held a location, it does not survive the conversion. That is a fact about this tool rather than a feature of it.
Should I pick baseline or progressive?
Baseline if the file goes to an old printer, a camera, a kiosk or an upload portal that has been around for decades: every JPEG reader opens it. Progressive if it goes on a web page, where a coarse whole picture appears first and sharpens as the rest arrives. The final pixels are the same either way; the precision encoder under Encoder writes both, and the receipt reads the frame type back out of the file.
What is the error map?
The saved JPG decoded again and compared with the flattened PNG it was made from, pixel by pixel. Where they agree the map is grey; where the JPEG changed something it glows amber, multiplied four, eight or sixteen times so small changes show. It also prints the PSNR, the largest error and the share of pixels changed by more than eight levels, and can jump to the worst block at 1:1. It never changes the file.
Can the matte be a colour from my own picture?
Yes. Under Matte, press any solid part of the picture and that pixel's colour fills the transparent areas; or use its commonest solid colour. A pixel under half coverage is refused, because its colour is mostly the old background. A colour taken this way is never stored, even with Remember my settings on.