creatorvalet

How to combine multiple JPG into one PDF

Thirty photos become one document, and the only thing that matters is that page three is page three. Why filenames sort wrong, and how to fix it.

Updated 2026-08-07

Merging pictures into a document is a small technical job wrapped around one demanding requirement, and almost nobody names the demanding part out loud. Turning six images into six pages is trivial. Turning them into pages one through six, in that order, is the entire task, and it is the only part that can fail in a way you will not notice until somebody else is reading the file.

A lease signed across six sheets, a set of drawings that only makes sense left to right, a portfolio where the strongest piece is supposed to open it — in each case a document with the right contents in the wrong sequence is not a partially correct result. It is a rejected one.

Why your files came out in the wrong order

The usual explanation you will read is that filenames sort alphabetically, so IMG_10 lands before IMG_2. That is true of plain text sorting, and it is worth understanding, because comparison happens character by character: 1 comes before 2, so a ten-something name beats a two-something name before the reader ever reaches the digits that matter.

But it is only half the story, and the half that gets repeated is the half that is least likely to be your actual problem. Finder and File Explorer both sort numerically on purpose. They notice runs of digits and compare them as numbers, so on screen you see 2 before 10, exactly as you would want. The naive ordering is not what your file manager is showing you.

Three real causes remain, and they are the ones that bite:

Selection order is not display order. When you shift-click a range, the picker hands the files over in the order the list was showing. When you pick them one at a time with a ctrl-click or command-click, some pickers hand them over in the order you clicked, which is whatever order your eye happened to travel in. Two selections that look identical produce two different documents.

Anything that is not your file manager sorts plainly. Archives, sync folders, scripts, upload widgets and a good number of web tools do the character-by-character comparison rather than the numeric one. The moment your files pass through one of those, the tidy order you saw in the folder is gone.

Scanners and cameras restart their counters. A run that crosses IMG_9999 wraps around to IMG_0001, and a batch assembled from two sessions can hold two files with the same name and two different pictures. Sorting cannot rescue that, by name or by number.

Renaming is the durable fix, if you are keeping the files

If these images are going to be handled more than once, pad the numbers so that every name is the same length: page-01, page-02, … page-12. Padded names sort identically under both schemes, so it no longer matters what touches them next — the folder, an archive, a script or a website all agree.

It is five minutes of renaming that removes the problem permanently rather than working around it once. Both major file managers rename in bulk from a multi-selection, so it does not have to be done by hand.

If the files are a one-off and you will never see them again, skip this entirely. Fix the order where you assemble the document and move on.

How to combine multiple JPG into one PDF in a browser

The practical requirement is that you can see and change the sequence before anything is written, rather than finding out from the finished file.

The JPG to PDF converter here is built around that. Drop the whole batch in at once and it lists every picture as a numbered row with a thumbnail, its pixel dimensions and its size — drawn from the file headers rather than by decoding every image, so forty twelve-megapixel photographs appear immediately instead of after a wait nobody asked for. The numbers down the left are the page numbers you are going to get.

From there the sequence is yours. Drag a row by its handle, press and hold to drag on a touchscreen, or use the plain up and down arrows beside each row, which is the option that works when a list is long and precise dragging is a nuisance. Remove a picture that turned out to be a duplicate, add more without starting again, and reorder as often as you like — nothing is re-read from disk, so it costs nothing to get right.

Then it tells you what you are about to get before you commit: the page count, the page dimensions, and an estimated file size. That estimate is trustworthy for a specific reason worth knowing, covered next.

The size of the result is arithmetic, not a surprise

A JPEG is already compressed, and a PDF can carry that compressed data exactly as it stands. Nothing has to be decoded and squeezed a second time. So the finished document weighs roughly what the pictures weighed, plus a few kilobytes of structure for each page.

That has a pleasant consequence and one blunt one. The pleasant one is predictability — no quality setting to agonize over, and no generation of compression loss added to photographs that already spent one. The blunt one is that twelve four-megabyte photographs make a forty-something-megabyte document, and mail servers have opinions about that. If the total is the problem, shrink the pictures first with compress an image to an exact size, or read how to reduce file size for the same problem across formats.

Files that a PDF cannot carry directly — WebP, GIF, BMP — are rebuilt once on the way in, and the receipt names each one so the change is never silent. If your batch is screenshots or logos rather than photographs, PNG to PDF is the page built for that material, and it can also place several images on a single sheet.

What to check before you send it

Three things, in about twenty seconds.

Page one and the last page. If the sequence was reversed, those two tell you instantly, and reversal is the single most common failure.

Any photograph taken with the camera turned sideways. Phones record the sensor’s landscape frame and add a rotation tag rather than turning the pixels, and a converter that ignores the tag hands you a document of pictures lying on their side. That tag is read and applied here, and any picture carrying one is flagged in the list before you run anything.

The page count against what you handed in. If a file could not be read it is named and set aside rather than skipped quietly, so a mixed batch never yields a document with a page mysteriously absent.

Then look at the document itself, which is displayed in the page rather than left for you to discover after downloading. A converter that hands over a file without showing it forces a blind download, and blind downloads are how wrongly ordered documents get emailed.