JPG to PDF

Published Updated

Put JPG and PNG images into one PDF, one image per page, with the JPEG data copied in unchanged.

Your photos go in untouched, at their own size

This tool puts each image on its own page and makes the page exactly the size of the image: one pixel becomes one point, 1/72 inch. JPEG data is copied into the PDF without being decoded or compressed again, so nothing is lost and the PDF weighs about the same as the photos. PNG files are accepted too.

The trade-off is page size. Photos from a phone make very large pages, and the tool has no A4 or Letter option.

How big the pages get

Page size in inches is the pixel size divided by 72, the number of points in an inch in the PDF format:

ImagePixelsPage size
12 MP phone photo4,032 x 3,02456 x 42 in (142 x 107 cm)
Full HD screenshot1,920 x 1,08026.7 x 15 in
Scan of A4 at 300 DPI2,480 x 3,50834.4 x 48.7 in
Small web image800 x 60011.1 x 8.3 in

Sideways phone photos are turned upright

Phones often store a portrait shot as landscape pixels and add an EXIF orientation tag. Browsers read that tag by default (CSS image-orientation is from-image), which is why the thumbnail in this tool looks upright. PDF viewers ignore the tag inside an embedded photo, so the tool reads it instead: the page takes the upright size and the photo is placed turned or mirrored, while the JPEG data stays byte for byte the same.

Test JPEGs carrying each of the eight orientation values all came out the way Google Chrome 156 shows them, checked with two PDF renderers, pdf.js and macOS's own. A 400 x 300 pixel JPEG tagged as orientation 6 becomes a 300 x 400 point portrait page.

What the PDF holds, measured for generated JPEGs

Each row is one JPEG made with Pillow, run through the page's own conversion code in Google Chrome 157, Firefox 155 and Playwright's WebKit build (not the Safari app), and read back with pikepdf. The code hands the file to pdf-lib's embedJpg, and in every row the image stream in the PDF is byte for byte the JPEG file, so a one-page PDF is the file size plus 920 to 970 bytes.

Generated JPEGFile bytesImage stream in the PDFPage (points)PDF bytes
RGB, baseline, 400 x 30023,016DCTDecode, DeviceRGB, same bytes as the file400 x 30023,955
RGB, progressive, 400 x 30014,733DCTDecode, DeviceRGB, same bytes400 x 30015,672
Greyscale, 400 x 30016,695DCTDecode, DeviceGray, same bytes400 x 30017,635
CMYK, 400 x 30049,735DCTDecode, DeviceCMYK with Decode [1 0 1 0 1 0 1 0], same bytes400 x 30050,703
1 x 1 pixel634DCTDecode, DeviceRGB, same bytes1 x 11,554
4,000 x 3 pixels2,224DCTDecode, DeviceRGB, same bytes4000 x 33,160
3 x 4,000 pixels7,383DCTDecode, DeviceRGB, same bytes3 x 40008,318
4,032 x 3,024 pixels374,946DCTDecode, DeviceRGB, same bytes4032 x 3024375,897
RGB file cut to half its length11,508DCTDecode, same bytes, no error400 x 30012,447

Chrome 157, Firefox 155 and the WebKit build produced the same page sizes and the same drawing commands for all 20 conversions. PDF sizes matched within one byte, because the image name inside the file is random. The file is not decoded, so a JPEG cut short is copied as it is, and a file that starts like neither a JPEG nor a PNG stops the conversion with a message asking for valid JPG or PNG images. 10 JPEGs of 640 x 480 pixels took 6 ms in Chrome 157, 9 ms in Firefox 155 and 12 ms in the WebKit build; 60 took 24, 41 and 42 ms. Those 60 files of 1,668,240 bytes gave a 1,688,792 byte PDF, 20,552 bytes more, about 342 bytes per page.

Where each EXIF orientation lands on the page

Eight copies of the same 400 x 300 pixel JPEG, each with one orientation tag and a red square at the top left of the stored pixels. The macOS PDF renderer drew each PDF, and the red square was found from the pixels: in every row it sits where the tag asks. The page size and placement matrix were identical in the three engines.

EXIF tagPage (points)Placement matrix (cm)Red marker stored at top left shows at
1400 x 300400 0 0 300 0 0top left
2400 x 300-400 0 0 300 400 0top right
3400 x 300-400 0 0 -300 400 300bottom right
4400 x 300400 0 0 -300 0 300bottom left
5300 x 4000 -400 -300 0 300 400top left
6300 x 4000 -400 300 0 0 400top right
7300 x 4000 400 300 0 0 0bottom right
8300 x 4000 400 -300 0 300 0bottom left

Making one PDF from your JPGs

  1. Step 1

    Add images in page order

    JPG, JPEG and PNG files are accepted. Pages follow the order in which files were added, and Add More Images puts new ones at the end.

  2. Step 2

    Remove what you do not want

    The trash icon drops a file. There is no reordering, so add files one at a time if the order matters.

  3. Step 3

    Convert and download

    Every image becomes one page of images-to-pdf.pdf, at the image's own size.

Other routes

JPG to PDF, common questions

Why are the pages in my PDF so large?

Each page is made exactly as big as the image, counting one pixel as one point, and a point is 1/72 inch. A 12-megapixel phone photo of 4,032 x 3,024 pixels becomes a page of 56 x 42 inches. It looks normal on screen, and a printer scales it down if you choose fit to page.

Are portrait phone photos upright in the PDF?

Yes. Many phones save a portrait photo as landscape pixels plus an orientation tag that tells viewers to turn it. The tool reads that tag and turns the page to match, without touching the JPEG data. In a test, a 400 x 300 pixel JPEG tagged as orientation 6 became an upright 300 x 400 point page.

Does it reduce the quality of my JPGs?

No. JPEG files are copied into the PDF byte for byte, so the PDF is about as large as the photos added together. PNG files are decoded and stored losslessly.

Can I change the order of the pages?

Not after adding them. Remove a file and add it again to move it to the end, or use PNG to PDF, which has move buttons and drag and drop but takes PNG files only.

Can I make A4 or US Letter pages with margins?

Not in this tool, since every page takes the size of its image. PNG to PDF can place PNG images on A4 or US Letter pages with a margin.

What if one file is not a real JPG?

The whole conversion stops with an error that asks for valid JPG or PNG images. A HEIC photo that was renamed to .jpg fails this way; convert it with HEIC to JPG first.

How much bigger is the PDF than the JPEGs I put in?

By a small amount per page, not a percentage. In a test of 60 JPEGs of 640 x 480 pixels totalling 1,668,240 bytes, the PDF was 1,688,792 bytes, about 342 bytes more per page. One 23,016 byte JPEG became a 23,955 byte PDF.

Do greyscale and CMYK JPEGs work?

Yes. A greyscale JPEG is stored in the PDF as DeviceGray and a CMYK JPEG as DeviceCMYK with an inverted Decode array, and the JPEG bytes are not changed. Chrome 157, Firefox 155 and the WebKit build gave the same result.

Does a PNG with a .jpg name work?

Yes. The tool looks at the first bytes of each file to tell PNG from JPEG, so a PNG saved as photo.jpg is stored as a PNG image, not rejected. A file that starts like neither, such as a renamed HEIC photo, still stops the conversion.

Does a damaged JPEG stop the conversion?

A file that starts like neither a JPEG nor a PNG stops it. A JPEG cut to half its length was copied into the PDF without an error, because the tool does not decode the image.

Related Tools