Merge in Filename Order - Free Online Browser Tool
Combine PDFs in the order their filenames sort, so chapter1, chapter2, chapter10 land in sequence.
You have eleven chapter files, you drop them all into the tool, and it produces a document whose contents read 1, 10, 11, 2, 20. The tool did nothing wrong. It compared the filenames as text, and as text "10" comes before "2" because the character 1 sorts before the character 2. Computers do this and people do not, and the gap between the two is why every operating system grew a "natural sort" option eventually. This is that. Filenames are broken into runs of digits and runs of letters, and the digit runs are compared as numbers while the rest are compared as text. chapter2 comes before chapter10, and report9 before report10, and the section you meant to be second is second. A prefix can be ignored for the purposes of the sort, which handles the common case of a set named "Draft - ch1.pdf", "Draft - ch2.pdf" and so on where the shared word is just noise in the ordering. Nothing is renamed: this decides the order the pages are joined in, which is what you came for, and quietly renaming your files would be a different and less welcome surprise. If you do want the machine order, it is there as an option - sometimes byte order is genuinely what you want, for instance when the numbers are padded consistently and the two readings agree anyway. Duplex padding is also available, adding a blank after each odd-length file so the next chapter starts on a fresh sheet rather than on the back of the last page of the previous one. The order actually used is listed in the result summary, so it is worth reading before you commit to a print run. Everything happens in this tab.
This merge in filename order utility runs completely inside your web browser. Your document is opened locally and processed on your own device using JavaScript and WebAssembly, so your file is never uploaded to any server. There is no signup, no watermark and no limit on how many documents you can handle.
- 100% client-side - files never leave your device
- Instant processing, no upload wait
- Works on desktop, tablet and mobile
- Free forever, no account required
How to Use the Merge in Filename Order Tool
Five steps, and the whole thing runs locally on your own device.
-
Add two or more PDFs
The order you drop them in is ignored - that is the point. One file is refused, since there is nothing to put in order.
-
Choose how to sort
Filename as a person reads it is the default and fixes the chapter-10-before-chapter-2 problem. Byte order is offered for the cases where that is what you actually want.
-
Ignore a shared prefix if you have one
Strips a repeated leading string before comparing, so "Draft - " in every name does not get in the way. The files themselves keep their names.
-
Decide about duplex padding
Adds a blank page after any file with an odd page count, so the following chapter starts on a fresh sheet instead of printing on the back of the last page of the previous one.
-
Save
One merged PDF, with the file order listed in the summary so you can confirm it read the way you expected.
Frequently Asked Questions
Why does chapter 10 come after chapter 2 here but not elsewhere?
Because this compares the digits in a filename as numbers rather than as characters. When a computer sorts "ch10" and "ch2" as plain text it compares 1 against 2 and puts ch10 first, which is correct as text and wrong as an intention. Reading the digit runs as numbers gives 2 before 10, which is what you meant when you named the files that way.
What if I have padded the numbers, like ch01 and ch02?
Both readings agree. ch01 and ch02 sort correctly either way, and ch09 stays before ch10. Padding to a consistent width is the other fix for the same problem and it also survives being moved to a system that does not offer natural sort.
Does it rename my files?
No. The prefix field only affects the comparison; the output is a single merged document and your originals keep their names on disk exactly as they were. Renaming files you did not ask to have renamed is the kind of helpfulness that loses people trust in a tool.
What order did it actually use?
The result summary lists every filename in the order it was joined, so if the reading was not the one you expected you can see it before printing rather than after. That matters most when a prefix is involved, since stripping the wrong prefix changes the comparison.
What if two of my files have the same name?
Both are merged, in whichever order the sort settles on, and the summary will show them next to each other because they read identically. Nothing is dropped - a file vanishing from a merge because its name matched another would be a genuinely bad outcome, so the page count always matches what you added. If the order you actually want is not alphabetical at all, Interleave Two PDFs takes two files and alternates them, which covers the other common arrangement.