Skip to content
Server-sideDeleted in 30 minutes

Convert JP2 to PNG

If the JPEG 2000 file came from an archive, a scanner or a medical device, there is a good chance it is lossless — and converting it to JPG would be the first time anything in its life was thrown away. PNG is the target that does not do that.

Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.

Add to Chrome — free
JP2PNG

Drop your JP2 file here, or click to browse

Up to 50 MB. Deleted automatically after 30 minutes.

What it does

  • Lossless — nothing is discarded in the encode
  • Right for document scans, where JPEG rings around text
  • Reads .jp2, .j2k and .jpf alike
  • Nothing to install

How to use JP2 to PNG

  1. 1

    Add the JP2

    Drop it in. The .jp2, .j2k and .jpf variants are the same codec in different containers and all are read.

  2. 2

    Decoded and re-encoded losslessly

    The pixels the JPEG 2000 decoder produces are the pixels written into the PNG. Nothing is approximated.

  3. 3

    Download the PNG

    It opens everywhere, and can be converted onward later without having lost anything on the way here.

How it works

The JPEG 2000 codestream is decoded through OpenJPEG and the resulting pixels are written into a PNG. PNG is lossless, so no new approximation is introduced at any point in the conversion.

Why lossless matters here specifically

Most format conversions do not need this discussion. This one does, because of where JP2 files come from.

JPEG 2000 has a lossless mode, and the institutions that adopted the format adopted it largely for that mode. A library digitising a manuscript, a repository accepting a deposit, a hospital storing a scan, a studio mastering a film — all of them chose JPEG 2000 because it could compress substantially without discarding anything.

Convert one of those to JPG and you introduce the first loss the image has ever suffered. It will look fine. It will also be, permanently, a slightly different image from the one the archive holds, and if it is ever compared against the master the difference is measurable.

PNG is the target that does not do that. It is larger — considerably larger, because PNG's compression is much simpler than JPEG 2000's — and it is exact.

The text-scan case

There is a second reason to prefer PNG here, and it applies even to lossy sources.

A great many JP2 files are scanned pages. JPEG's compression works by discarding detail the eye is unlikely to miss in a photograph, and its characteristic failure is ringing: faint ghosting alongside a sharp boundary between two very different colors. Black text on white paper is nothing but such boundaries, which is why JPEG scans of documents look slightly grubby at any quality and why OCR performs worse on them.

PNG has no such artifact, because it discards nothing.

Keep the original

If the JP2 came from an archive or an institution, keep it. The PNG is a working copy in a format your software understands; the JP2 is the version that institution will still hold in twenty years, and it is smaller.

What PNG cannot carry across

Two things travel in a JP2 and not in a PNG, and neither is pixels.

Resolution levels. A JPEG 2000 file can be decoded at half size, quarter size and so on straight from the same codestream, without decoding the whole image. That is why archives can serve a deep-zoom viewer from a single master. A PNG is one image at one size; the ability is not lost from your data, but it is not in the new file.

Region-of-interest decoding. A viewer can pull one tile out of a hundred-megapixel JP2 without reading the rest. PNG has no equivalent, which is why very large images become slow once converted.

Neither matters if you are converting a page or a plate to work with. Both matter if you were planning to replace an archival master with the PNG, which is the thing not to do.

Examples

A lossless archival master

folio-012.jp2
folio-012.png

A deposit copy is often lossless JP2. PNG keeps it that way while making it openable by ordinary software.

A scanned page of text

page.jp2
page.png

Sharp black-on-white edges are exactly where JPEG's ringing shows. PNG has none of it.

Frequently asked questions

Is this conversion really lossless?

The PNG encoding is, completely — PNG is a lossless format and every pixel the decoder produced is written exactly. Whether the whole chain is lossless depends on the source: a lossless JP2 stays lossless end to end, and a lossy JP2 cannot have back what it discarded when it was made. What this guarantees is that no NEW loss is introduced, which /jp2-to-jpg cannot promise.

How do I know if my JP2 is lossless?

Usually by where it came from. Archives, libraries and repositories specify lossless JPEG 2000 for master copies; digital cinema packages and most medical imaging are lossless too. Files from cameras and some scanners are lossy. If it matters and you cannot tell, treat it as lossless and use this rather than the JPG conversion — the cost of being wrong is only a larger file.

Why is the PNG so much bigger than the JP2?

Because JPEG 2000 is a far more sophisticated compressor. Its wavelet transform models an image much more efficiently than PNG's approach, which is essentially a filter followed by ZIP-style compression. A lossless JP2 is typically half the size of a lossless PNG of the same picture. You are trading size for a format everything can open, which is the whole point of the conversion.

Should I use PNG or JPG?

PNG when the source is lossless, when the image is a document or text scan, or when it will be converted onward again later. JPG — /jp2-to-jpg — when the file is going into an email, a form or a web page and size is what matters. For a photograph destined for a screen, JPG at quality 82 is indistinguishable and a fraction of the bytes.

Does my file leave my computer?

Yes. JPEG 2000 decoding needs a codec library that runs on our server rather than in a browser tab. Your file and the result are both deleted within 30 minutes by a timer, and nothing is stored, indexed or examined.