Reorder PDF Pages
Reorder PDF Pages
Scanned a double-sided document on a one-sided scanner?
If the file holds all the fronts and then all the backs, this deals them back together: front 1, back 1, front 2, and so on. Flip the stack to scan the backs and they arrive last page first, which is the second button.
How to reorder PDF pages
Add your PDF
Drag your file onto the dropzone or click to choose. Each page becomes a draggable thumbnail in the grid below.
Drag to reorder
Grab any thumbnail and drop it where it belongs; the pages in between slide over. Pages out of their original place get an orange border.
Or type where it goes
On a phone or a keyboard, use ↑ and ↓, type a position in the box under a thumbnail, or type the whole order ("5, 1, 3-2") above the grid. Reverse all flips everything and Reset to original undoes it all.
Apply and download
The file saves as {original}-reordered.pdf. Your original is not changed. If the page lists anything under the drop area (a signature, page labels, tags), read that before you send the result on.
What moves with a page, and what stays put
A PDF keeps its pages in a tree of page objects, and the reading order is simply the order of the leaves in that tree (ISO 32000-1 §7.7.3). This tool takes each page out of the tree and puts the same object back in its new place, so nothing on the page is redrawn or re-encoded.
| Part of the file | After a reorder |
|---|---|
| Text, images and fonts on the page | Unchanged. The page's content is not touched. |
| Page size, crop and rotation | Kept, including values a page inherits from its parent in the tree. |
| Form fields and annotations | Move with their page. Fields stay fillable and keep their values. |
| Links and bookmarks | Point at a page object, so they still reach the same page at its new position. |
| The bookmark list itself | Keeps its original order, which may no longer match the pages. |
| Page labels (i, ii, 1, 2) | Stay with the position, not the page: labels are keyed by page index (§12.4.2). |
| Reading order of a tagged PDF | Does not follow. The structure tree is a separate order (§14.7). |
| "See page 7" typed in the text | Does not update. Nothing in the file knows it is a reference. |
| A digital signature | Stops verifying. See below. |
Signed PDFs
A signature covers an exact range of the file's bytes (§12.8). Signing software adds later changes by appending to the file, which leaves those bytes alone (§7.5.6). pdf-lib cannot do that: it writes the whole file out again, so the signed bytes no longer exist, and a validator will report the signature as broken even if you only swapped two pages. Reorder first and sign last, or keep the signed original. The tool warns you when it finds a signature, and PDF Signature Checker will show you what is in a file.
Page sizes and rotation, fixed on 2 November 2026
A PDF can state a page's size, rotation and fonts once on a parent node of the tree and let the pages under it inherit them (§7.7.3.4). The reorder hangs every page directly off the root, so those pages lost their parent, and with it the values. In our test the saved pages had no size at all and their text was gone. The tool now writes inherited values onto each page before moving it. If you reordered a file before that date and it opened blank or the wrong shape, run the original through again.
FAQ
-
No. pdf.js draws the thumbnails and pdf-lib does the reorder, both in your browser, and the result is handed to you as a download. Choosing a file uploads nothing. The page's own scripts and any consented ads still load as they do on any page, so filter DevTools → Network while you work if you want to see that for yourself.
-
Most mobile browsers do not fire drag events from a touch. Type a number in the box under a thumbnail to send that page straight to a position, or type the whole order above the grid. The ↑ and ↓ buttons move a page one slot at a time.
-
You can, but the saved copy's signature will not verify, because pdf-lib rewrites the whole file and a signature covers exact bytes. Reorder before signing. The tool tells you when the file you added is signed.
-
Open "Scanned a double-sided document on a one-sided scanner?" above the grid. If the backs were scanned in page order, use Backs in order. If you flipped the whole stack, so the last back came first, use Backs in reverse. The result shows in the thumbnails before you save, so you can try one and then the other.
-
No, not even one that opens without a password. "Restriction-only" protection (an owner password that blocks printing or editing) still encrypts the file's text and images, and pdf-lib cannot decrypt them, so anything it saved would be broken. The tool says so as soon as you add such a file. Save an unprotected copy first, in software that has the password.
-
No page content is added or removed, but pdf-lib writes the whole file out again and packs its structure differently, so the size can move in either direction. A big change usually means the original was stored with little structural compression.
Method & sources
How it computes
Reorders in place: writes each page's inherited MediaBox, CropBox, Rotate and Resources onto the page, then removes the page objects from the document's page tree and adds them back in the new order, so the form, bookmarks, title and author remain. Loaded with updateMetadata: false, so the file keeps its own Producer. The file is rewritten whole, so a digital signature stops verifying; the page warns.
What this tool implements
- ISO 32000-1 §7.7.3: page order is the order of the page tree's leaves. Links and outline items name a page object, so they follow the page; tested 2026-11-02 with an outline entry on a moved page.
- ISO 32000-1 §7.7.3.4 and Table 30: Resources, MediaBox, CropBox and Rotate are inheritable. They are pinned onto each page before it moves, because pdf-lib re-parents every page to the root. Measured 2026-11-02 on pdf-lib 1.17.1: without pinning, a page that inherited from an intermediate node came out with no MediaBox.
- ISO 32000-1 §12.4.2: page labels are keyed by page index, so they stay with the position. §14.7: the structure tree of a tagged PDF is a separate order. §12.8: a signature covers a byte range, and pdf-lib rewrites the whole file instead of appending an incremental update (§7.5.6). The page reports all three for the file in hand.
- Corrected 2026-11-02: lost inherited page attributes; pdf-lib stamped as Producer on load (PDFDocument.load defaults to updateMetadata: true); "expect the output to be within a few hundred bytes" (the whole file is rewritten); "cross-page links are updated where the PDF spec supports automatic re-targeting" (nothing is re-targeted, links name page objects); an essay still describing a copy into a new document; "zero outbound traffic"; thumbnails captured after about 200 ms whether or not the page had finished drawing.
Sources
- ISO 32000-1:2008, Document management — Portable document format — Part 1: PDF 1.7 (§7.5.6 Incremental updates; §7.7.3 Page tree; Table 30; §12.3.3 Document outline; §12.4.2 Page labels; §12.8 Digital signatures; §14.7 Logical structure).
- Adobe. PDF 32000-1:2008, the free copy of ISO 32000-1. https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF…
- Hopding A. pdf-lib, src/api/PDFDocument.ts (updateMetadata defaults to true on load). https://raw.githubusercontent.com/Hopding/pdf-lib/master/src/api/…