JPEG 2000 converter
Convert JPEG 2000 files (.jp2, .j2k, .jpx, .jpf) from archives, scanners and observatories to JPG, PNG or PDF. 16-bit images belong in PNG.
.jp2 · .j2k · .j2c · .jpc · .jpx · .jpf
Format
About JPEG 2000
JPEG 2000 is a wavelet-based image standard from 2000, unrelated to classic JPEG apart from the committee that wrote it. It comes in two wrappings. A .j2k or .j2c file is a bare codestream starting with the bytes FF 4F FF 51. A .jp2 file wraps that codestream in boxes, starting with the 12-byte signature 00 00 00 0C 6A 50 20 20 0D 0A 87 0A, and adds colour space, resolution and optional XML metadata. JPX (.jpx, .jpf) is the extended Part 2 version with more colour spaces and layering.
The format never took off on the web, but it is the standard for preservation work. National libraries and digitisation projects store page scans as JP2, digital cinema packages use JPEG 2000 frames, medical and satellite systems use it for 16-bit images, and NASA's Solar Dynamics Observatory images are served as 4096×4096 JP2 files with their FITS header in an XML box. Chrome, Edge and Firefox do not display it and Windows has no built-in viewer, so most people meet it as a download nothing will open.
Our image engine decodes .jp2, .j2k/.j2c and .jpx/.jpf through the same path. JPG output is the light option, although usually larger than the JP2 because JPEG 2000 compresses better: the solar image went from 1,078,612 to 1,744,569 bytes in 1.5 s. PNG keeps 16-bit grayscale and alpha exactly, at the cost of large files. PDF output puts each image on its own page, with page size set by the dpi option. XML boxes are not carried into any target.
Size and bit depth are the two things to check before converting. Decoding time and memory grow with the pixel count: a 67-megapixel scan took 35 s and 1.3 GB as JPG, and did not finish as PNG within our time limit. 16-bit files currently come out white in JPG and PDF, so convert them to PNG or TIFF.
Convert JPEG 2000 to…
Common JPEG 2000 problems
A .jp2 download from a digital library will not open.
Use /convert/jp2-to-jpg for a viewing copy, or check whether the library also offers JPG or PDF downloads of the same page.
A 16-bit scientific or medical image turned white as JPG.
JPG is 8-bit only. Use /convert/jp2-to-png, which keeps the full 16-bit values.
A very large scan times out or takes minutes.
Use JPG rather than PNG for large colour scans (a 10-megapixel colour PNG took 50 s), or decode a reduced level locally with opj_decompress -r 1.
An archive page scan needs to be printed or emailed.
Use /convert/jp2-to-pdf with dpi set to the scan resolution, usually 300 or 400, to get the original paper size.