File & PDF Tools

Reorder PDF Pages

Rebuild a PDF using a custom complete page order.

Reorder PDF pages
Rebuild the document from a complete page-number sequence.
Local browser processing

Reorder PDF Pages

Enter a complete page sequence such as 3,1,2,4 to create a document in that order.

Validation

  • Every page must appear exactly once
  • Ascending and descending ranges are supported
  • Page content is not re-encoded

Rebuilds a PDF from a complete page-number sequence you type or drag, so the original page 7 can become page 1 without any page content being re-encoded. It fits back-to-front scans, two-pass duplex scans whose sides need interleaving, and single pages filed in the wrong position.

Page order is the /Kids array, nothing else

A PDF displays pages in the order the page objects appear in the /Kids array of the root /Pages node; readers never re-sort by content, size, or date. This tool does not renumber or redraw anything: it creates an empty document, calls copyPages(source, order) with the index array derived from your sequence, then appends each returned page. Because whole page dictionaries are copied, every page keeps its MediaBox, CropBox, /Rotate value, annotations, and its original content streams byte for byte. A reversed 300 dpi scan is still the same 300 dpi scan. The only property that changes is the index each page object occupies in the new tree.

What the sequence field accepts and rejects

Tokens are parsed by the same routine the split and remove tools use: each comma-separated part must match ^(d+)(?:s*-s*(d+))?$, so 3,1-2 and 5-1 expand normally, while an empty part from a stray comma, 1..3, or a number past the page count raises a range error. Reorder mode parses with unique:false, which preserves duplicates, and then requires two conditions: the result length must equal the page count, and the value set must have no repeats. Hence 3,1,2,4,4 fails as five entries for four pages and 3,1,2 fails as a missing page. Dragging tiles or pressing the arrow buttons rewrites the field as plain comma-separated numbers, so a 200-page file shows 200 tokens.

What the new document cannot carry over

Output starts from an empty catalog, so only page objects cross over. The outline tree (/Outlines), the AcroForm dictionary, /PageLabels, embedded files, and the document information dictionary are not recreated. In a measured four-page test, a source with Title and Author produced output where both were empty and Producer read pdf-lib. Consequences readers notice: folio numbering restarts at physical page 1, bookmarks disappear, and a form that was fillable before is now flat ink. Text inside the page is untouched, which is why a reversed file still prints “Page 1 of 12” on its new page 12, and in-text references such as “see page 5” keep pointing at the old position.

Worked example

Reordering a four-page test PDF

Input
Page order 3,1,2,4 applied to a 4-page PDF whose pages are 420, 440, 460 and 480 pt wide (1,499 bytes)
Output
A 4-page PDF with widths 460, 420, 440, 480 pt, 1,498 bytes, header %PDF-1.7

Width is a per-page property, so reading it back proves the order: the original page 3 (460 pt) is now page 1. The copy is verbatim — /Rotate and CropBox travel with their pages — but Title and Author came back empty and Producer reads pdf-lib, because the fresh catalog holds pages only.

Limits and pitfalls

  • Each file must be 100 MB or smaller; reorder opens a single PDF at a time, so the 250 MB combined ceiling used by the merge tool never applies here.
  • The drag-and-drop thumbnail strip appears at 120 pages or fewer (0.28-scale JPEG previews); above that you edit the comma-separated sequence directly.
  • A sequence that skips a page or repeats one is rejected with “The order must contain every page exactly once” — removing pages belongs to the remove-pages tool.
  • Encrypted and password-protected PDFs fail when the document is loaded, and reordering cannot unlock them.
  • Bookmarks, page labels, form fields, and Title/Author are not written into the new file, so keep the original if something downstream needs them.

Related tools

When it goes wrong

I typed 3,1,2,4 into Complete page order, got the every-page-once error, and the tiles below still sit in their old order.

CauseThe field commits on change (blur or Enter) only, and syncReorderFromExpression writes the message and returns early whenever the parse fails or either check fails, leaving reorderOrder untouched. The strip therefore keeps the last accepted order while the box holds the rejected text, and the Reorder pages button re-reads the box rather than the tiles, so it repeats the same error.

FixMake the text list every page exactly once (for a 4-page file: 3,1,2,4), or clear the box and arrange pages by dragging or with the left and right arrows, which rewrite the box as plain comma-separated numbers.

I dropped three PDFs at once and the list shows only the first one, with no warning.

CauseReorder is single-document by construction: the dropzone is mounted with multiple off, and selectFiles keeps just selected[0] before reading pageCount from documents[0]. Nothing in this mode has a slot for a second document, so extra files are dropped silently instead of being rejected.

FixTo interleave pages from two scans, merge them first in Merge PDFs and reorder the merged file; otherwise run each file through the reorder step one at a time.

A tile shows a big page number instead of a picture, but dragging it still changes the order.

CausePreviews are best effort. Every page is rendered by pdf.js into a canvas at 0.28 scale and encoded as a 0.72-quality JPEG, and that loop is wrapped in a try with an empty catch, so a canvas allocation failure or a pdf.js error leaves urls[index] unset and the tile falls back to the placeholder number. The order array is tracked independently of the images.

FixRead the number on the tile as the source page number and set the sequence in the text field instead; reloading the page gives rendering one more attempt.

I built and downloaded the file, nudged one tile out of curiosity, and the whole Result panel vanished.

CausemoveReorderPage and dropReorderPage both call resetOutput, which nulls the stored blob, and the Result panel is behind v-if on outputBlob. The panel collapses instead of offering a stale download.

FixFinish arranging before generating; if you do change the order afterwards, press Reorder pages again and download the new result.

I loaded the file, changed nothing, pressed Reorder pages, and the bookmarks and Title were gone.

CauseThere is no in-place path. processPdf always calls PDFDocument.create() and appends pages returned by copyPages, even for the identity order 1,2,3,..., so the output is a fresh catalog holding page objects only; the outline tree and the information dictionary are never carried across.

FixKeep the original for anything that needs its outline or title and reorder only the copy that goes downstream; title, author and keywords can be written back afterwards with Edit PDF Metadata.

One concrete scenario

A twelve-sheet duplex scan that came out back to front

A feeder that turns each sheet over after scanning hands back a twelve-page file whose pages read 12, 11, ..., 1. Typing 12-1 into Complete page order is enough: the parser accepts a descending range, so that single token expands to twelve indices, passes both gates (twelve entries, twelve distinct values), and costs four characters instead of the 26 a comma-separated list of those twelve numbers needs. The thumbnail strip appears, since twelve is far under the 120-page cut-off, and each A4 page of 595.28 x 841.89 pt previews at 167 x 236 px. Confirm the leftmost tile is labelled 12, then press Reorder pages. For a wholesale reversal, use the range, not dragging.

Frequently Asked Questions

Must the sequence include every page?
Yes — that is what makes it "reorder" rather than "delete": each page number appears exactly once (3,1,2,4 is a complete reordering), and the tool validates for missing or duplicate pages so no page silently disappears. To drop a page, use the remove tool.
Are descending ranges supported?
Yes: 5-1 produces 5,4,3,2,1, and mixed forms like 3,1-2 are legal. The classic use: a contract scanned back-to-front gets fixed with "last-first" in one step.
Does reordering re-encode pages?
No. Like merging and splitting, it copies and orders page objects — fonts, vectors, and sharpness are preserved verbatim. Reorder as often as you like; scans will not soften.

Content reviewed: