What it means to convert JPG to PNG
Converting JPG to PNG does not recover detail. JPEG compression is lossy and permanent: the moment the original was written, some information was rounded off and thrown away. Re-saving as PNG stores whatever survived with perfect fidelity, artifacts and all.
That sounds like a reason not to bother, and for a photo you are simply going to look at, it is. The value is elsewhere. PNG is lossless, which means the file stops decaying. Open a JPEG, crop it, save it, open it again, adjust the levels, save again, and each round trip re-compresses everything and adds a little more damage. Do that in PNG and the tenth save is bit-identical to the first.
When this is the right conversion
Three situations make it clearly worthwhile.
The first is an editing pipeline. If the file is going to be opened and saved several times, or handed between people and tools, converting once to PNG puts a floor under the quality.
The second is a tool that will not take anything else. Icon builders, some game engines and asset pipelines, a lot of documentation systems, and plenty of upload forms accept PNG only.
The third is compositing. Anything you plan to layer, mask or cut out belongs in a format with an alpha channel. The JPEG has no transparency to bring along, but the PNG can hold the transparency you add later.
What the file size will do
It will grow, often five to ten times. PNG spends its bytes describing every pixel exactly, and photographic content is close to worst case for that: a million subtly different colours with almost no repetition for the compressor to exploit.
This is worth saying plainly because a lot of people convert to PNG expecting a better image and get a much bigger one instead. If size matters and you only need to view or publish the image, keep the JPEG.
JPG and JPEG are the same thing
Worth clearing up, because it a search for jpeg to png and a search for jpg to png land on the same need. The
three-letter extension is a leftover from the era when filenames allowed only
three characters after the dot. There is no format difference, no quality
difference and no compatibility difference: .jpg and .jpeg are byte-for-byte
the same kind of file.
Local processing
Decoding and re-encoding both happen in this browser tab through the canvas API. Nothing is uploaded, so there is no queue, no file size limit imposed by a server, and no copy of your photo sitting somewhere else afterwards.