Image to PDF
How to make a PDF from images
- Add your pictures: drag them onto the box above or click to browse. JPG, PNG, WebP, GIF, AVIF and BMP work.
- Put them in order with the Move up and Move down buttons. The first row becomes page 1.
- Choose a Page size (A4, US Letter or Same as the image) and a Margin.
- Click Create PDF.
- Download the file, or click Start over to make another. One picture gives
name.pdf, several giveimages.pdf.
What this image to PDF tool does
You add pictures, the tool puts one picture on each page, and you download a single PDF. The order of the list is the order of the pages. Two menus control the page: Page size (A4, US Letter or Same as the image) and Margin (None, Small or Large). Everything runs in your browser tab, so the pictures are read from your disk, laid out by a PDF library and handed back as a download.
We tested the privacy claim. In a test run we logged every outgoing request from the page: 17 in total. The outside ones were the two Google ad and analytics calls that every GramFile page makes on load and 2 to jsDelivr for the PDF library, with a hash check. None carried a body, so no picture was sent. Only Chromium was used, and other browsers have not been tried.
The output is named after your picture when you add one (photo-1280x960.jpg gives photo-1280x960.pdf) and images.pdf when you add several.
Page size, margin and where the picture lands
A4 is the default size and Small the default margin. A4 and US Letter turn sideways for a picture that is wider than tall. Margins are 0, 18 and 36 points, which are 0, a quarter inch and half an inch. We read back the page size and the picture's resolution for four settings, using the 1280 by 960 pixel sample photo.
- A4, Small margin: a landscape page of 841.89 by 595.28 points, with the picture at 124 pixels per inch.
- A4, no margin: the same page, with the picture at 116 pixels per inch.
- US Letter, Large margin: a landscape page of 792 by 612 points, picture at 128 pixels per inch.
- Same as the image: a page of 960 by 720 points, which is 0.75 points per pixel, and the picture at 96 pixels per inch.
On A4 and Letter the picture is scaled to fit inside the margins, and it is never enlarged by more than 12.5 percent. We saw the cap in action with a 300 by 300 pixel picture: it sat in the middle of a portrait A4 page at 64 pixels per inch and left the rest of the page empty. Use Same as the image when you want the page to match the picture exactly. There is no setting for a different page size per picture, and no cropping or rotation by hand.
What happens to each file type
The tool accepts JPG, PNG, WebP, GIF, AVIF and BMP. They are not all treated the same way, and the table further down the page shows what we measured with sample files. We read the stored picture data back out of each PDF.
JPG goes in untouched. We pulled the JPEG data back out of the PDF and compared it with the source file: identical. The PDF was 980 bytes bigger than the 247,358-byte photo, which is the page around it. There is no second round of compression.
PNG goes in without losing a pixel, and the PDF still gets bigger. We extracted the picture from the PDF and compared it with the source: zero pixels different. The PDF was 820,377 bytes against a 620,844-byte PNG, 32 percent larger. The PNG with transparency grew by 35 percent and kept its see-through background. We did not trace why the PNGs grow. The likely reason is that the PDF library packs the pixels with its own compression, which is less tight than the one used by the program that saved the PNG.
WebP, AVIF, GIF and BMP are decoded and re-saved. The browser reads them and the tool saves each page as a JPEG at quality 0.92, or as a PNG when the picture has transparency. For small, efficient files the growth is large. The 19,836-byte WebP photo became a 72,499-byte PDF, and the 19,912-byte AVIF photo became 94,625 bytes. It is also a second lossy pass on pictures that were already compressed once. We checked file types and sizes, not how the pictures look, so judge a sharp-edged graphic by eye. If its edges matter, save it as a PNG first.
An animated WebP gives one page: the first frame. The 3-frame sample produced a 1-page PDF.
Phone photos, rotation and HEIC
Phones often store a photo sideways and add a flag that says how to turn it. Our sample is stored as 960 by 1280 pixels with the flag set to "right top". The tool read the flag, turned the picture upright and made a landscape page with a 1280 by 960 picture on it. That photo is re-saved as JPEG, since it has to be turned, and the PDF came to 155,309 bytes against 158,364 for the source. A rotated photo is the one JPEG case where the data is not kept byte for byte.
iPhone photos are often HEIC, and this tool does not accept them. A HEIC file is refused when you add it, with a message that the file type is not supported here. Convert it with HEIC to JPG and add the JPG. SVG files are refused in the same way.
Setting the order
Pages follow the list. Once two or more pictures are in the list, each row gets arrow buttons labelled Move up and Move down, plus Remove. We added a JPG, an 800 by 600 PNG and a rotated JPG, then moved the third one up twice. The list read back in the new order, and in the PDF the PNG had moved from page 2 to page 3. Changing the order after a PDF is made clears the result, so click Create PDF again.
Limits and what stops a PDF
You can add up to 100 pictures, and each can be up to 50 MB. We added 101 copies of the sample photo: the list kept 100 and said "Only 100 files at a time." A run of 100 JPEGs took 0.9 s and made a 100-page PDF of 24,772,880 bytes. The inputs added up to 24,735,800 bytes, so the pages cost about 370 bytes each. We have not tested pictures near 50 MB, and recoded pictures above 16 million pixels are scaled down before saving.
One unreadable picture stops the whole job. We added the good sample photo together with a text file named .jpg. No PDF was made, and the message named the bad file. Remove it from the list and click Create PDF again.
Common jobs
- Forms and applications. Photograph each page or document, add them in order and keep A4 with a Small margin. If the portal has a size cap, run the PDF through the PDF compressor.
- Screenshots. PNG screenshots keep every pixel but make a bigger PDF than the PNGs themselves, as our test showed. Compress the result if size matters.
- Pictures plus an existing PDF. Make the picture PDF here, then join it to your other file with merge PDF.
Measured conversions
| File | File bytes | PDF bytes | How it is stored | Time |
|---|---|---|---|---|
| JPG, 1280 by 960 | 247,358 | 248,338 | The original JPEG data, byte for byte | 0.4 s |
| JPG with a rotation flag | 158,364 | 155,309 | Turned upright, re-saved as JPEG | 0.4 s |
| PNG photo, 800 by 600 | 620,844 | 820,377 | Lossless, pixels identical | 0.9 s |
| PNG with transparency | 21,105 | 28,543 | Lossless, transparency kept as a mask | 1.0 s |
| WebP photo | 19,836 | 72,499 | Decoded, re-saved as JPEG | 0.3 s |
| AVIF photo | 19,912 | 94,625 | Decoded, re-saved as JPEG | 0.4 s |
| GIF logo | 8,632 | 26,978 | Decoded, re-saved as JPEG | 0.3 s |
| BMP, 320 by 200 | 192,138 | 3,896 | Decoded, re-saved as JPEG | 0.4 s |
| Animated WebP, 3 frames | 30,122 | 11,696 | First frame only, transparency kept | 0.4 s |
Prefer desktop software?
Use a desktop program when each picture needs its own page size, when you want to crop or straighten pages, when a scan should become searchable text, or when you have more than 100 pictures or files above 50 MB. A full PDF editor does all of that in one place.
GramFile has download pages for Foxit PDF Editor and Nitro PDF Pro.
Frequently asked questions
Are my pictures uploaded?
No. Your browser reads them and builds the PDF on your computer. The only outside traffic we recorded was to Google's ad and analytics hosts and to jsDelivr for the PDF library, with no picture in it.
Does a JPG lose quality in the PDF?
No, unless it has a rotation flag. We compared the JPEG data inside the PDF with the source file and it was identical. A rotated JPG is turned upright and re-saved at quality 0.92.
Why is the PDF bigger than my pictures?
It happens most with WebP and AVIF, which are re-saved as JPEG, and with PNG, which the PDF library packs less tightly. In our test a 19,836-byte WebP made a 72,499-byte PDF. Use the PDF compressor if the size matters.
Can I use iPhone HEIC photos?
Not directly. HEIC files are refused. Convert them to JPG first with the HEIC to JPG tool, then add the JPGs.
How do I change the order of the pages?
Add two or more pictures and use the Move up and Move down buttons on each row. The PDF follows the list from top to bottom.
Can each picture have its own page size?
No. One page size applies to the whole PDF. Same as the image sizes every page to its own picture, which gives pages of different sizes.
What happens to a transparent PNG?
The transparency is kept as a mask, so the page behind it shows through. In our test the transparent PNG grew by 35 percent in the PDF.
How many pictures can I add?
Up to 100, each up to 50 MB. A 101st picture is refused with a message. We tested 100 JPEGs, and nothing close to 50 MB.
What happens to an animated image?
Only the first frame is used, so you get one page.