Processed on-device · pdf.js + pdf-lib

Reverse PDF Page Order Online

— flip the whole file, one range, or drag pages by hand

Fix a document that came out of an ADF scanner backwards, or one where only a section is out of sequence — full reverse and custom-range reverse both run directly in your browser.

See the four steps
Full reverse Custom range reverse Per-page rotate Add blank pages PDF stays in your browser
Built & maintained by Bhavin J. Sheth | Updated

Reverse your PDF

Upload a PDF, check the page order, and reverse the pages you need.

Drop your PDF here

or browse files

How reversing actually works

Reversing fixes sequence, not content

Some automatic document feeder setups can produce a PDF with the last page first, especially when a stack is fed in reverse order. Reversing changes the page sequence without altering the page content.

Order, not orientation

A common scanner behavior loads a stack of paper and feeds it starting from the bottom, so page 1 of the physical document ends up last in the file. Manually dragging fifty page thumbnails into the opposite order is exactly the kind of tedious task that's easy to get wrong halfway through — reversing does the same job as one operation.

pdf-lib copies each page into a new document in reverse index order using copyPages; the original file is only read, never modified. Custom Range Reverse applies that same flip to a slice of the array instead of the whole thing, leaving everything outside the range exactly where it was.

Everything you can do before reversing

Full reverse

Flips the entire document in one click — the fix for a fully backwards scan.

Custom range reverse

Reverses only pages Start through End, leaving the rest of the document untouched.

Manual drag and drop

Drag any page thumbnail into a new spot, or select a page and use its move arrows.

Per-page and bulk rotate

Fix an upside-down or sideways page individually, or rotate every page at once.

Blank pages and additional PDFs

Insert a blank separator page, or pull in pages from another file before you reverse the sequence.

Full reverse is a guess until you check the ends

Look at the first and last thumbnail before picking a mode — it tells you which fix you actually need.

1

Upload your PDF

Drag it onto the upload area, or click Select PDF. Thumbnails of every page load right away.

You can add pages from another PDF at any point before reversing.
2

Pick a reverse mode

Choose the mode that matches what's actually wrong:

Full reverse: flips all pages (a 10-page PDF becomes 10, 9, 8...1).
Custom range: enter Start and End to reverse only that section.
Manual: drag thumbnails or use move arrows for exact control.
3

Reverse it

Click Reverse PDF — the file is rebuilt with the new order directly in this tab.

Rotate all or per-page before this step if orientation is also wrong.
4

Check and download

Page through the result to confirm the new order, rename it if you like, then download.

Full-file preview Page content preserved

From backwards scan to correct reading order

A common ADF scanning problem, fixed with the right page order.

Reverse-scanned Wrong order
PDF scanned in reverse order with last page first before reversing

Pages 10, 9, 8...1 — the document reads backwards after an ADF scan.

Reversed
Correct order Reads 1 to 10
PDF pages in correct reading order after reversing

Pages 1, 2, 3...10 — proper reading flow restored in one click.

Documents that came out of the scanner backwards

Cases where a page-order mistake — not the content — is the actual problem.

Common situations for reversing PDF page order, by user type
SituationWhat to reverseTypical user
Reverse-scanned documentsFix books, reports, or invoices scanned back-to-front by an ADF scanner.Offices & archivists
Legal document scansRestore the intended page sequence when a contract, filing, or case document was scanned back-to-front.Legal teams
Booklet or print workflowsReverse page order when a specific printing or finishing workflow requires the pages in the opposite sequence.Printers & binders
Scanned reportsRestore the intended order of reports or document batches that were scanned back-to-front.Offices & teams
Academic papersRestore the page sequence when a scanned paper or document batch is in reverse order.Students & researchers
Industrial printingFlip page order for specific printers that feed sheets in reverse.Print operators
PortfoliosCorrect portfolio pages that landed in the wrong sequence before sharing.Designers & artists
Review proofsCreate a reverse-order copy for a specific review or quality-check workflow.Editors & reviewers
Reverse modes explained

Four ways to correct a PDF sequence

Each mode solves a different version of the same underlying problem.

Full reverse

Flips the entire document — page N becomes page 1. A practical fix when an ADF scan produces the pages in reverse order.

Custom range reverse

Reverses only pages Start through End, leaving the rest untouched. Right when only one section of a longer document was scanned in the wrong order.

Manual drag and drop

Drag page thumbnails into any order, or select a page and use its move arrows. Best when the sequence needed isn't a simple reversal at all.

Rotate + reverse combo

If pages are both out of order and upside down, rotate first — per-page or Rotate All — then reverse the sequence for a fully corrected document.

When the order still isn't right

Identify the problem, then use the matching fix.

Symptom
Why it happens
Fix

"Invalid page range" alert

Start is greater than End, or one of the numbers falls outside the document's page count.

Enter a Start ≤ End, both within the total page count shown on the thumbnails.

The wrong section got reversed

The Start/End numbers didn't match the section you actually meant.

Check the page numbers under each thumbnail, then re-enter Start and End.

Pages are still upside down

Reversing fixes page order, not orientation.

Rotate the affected pages before creating the reversed PDF.

PDF won't load

The file may be encrypted, corrupted, or unsupported by browser PDF engines.

Try an unlocked or repaired PDF, then upload it again.

A large PDF is slow to process

Hundreds of pages use significant browser memory to render and re-copy.

Close other tabs for more memory headroom, then try again. Very large PDFs may still exceed the browser's available memory.

A password-protected PDF won't load

Some password-protected or encrypted PDFs cannot be opened by in-browser engines.

Unlock the PDF first with Unlock PDF, then reverse the unlocked copy.

Drag and drop won't move a page

Some touchscreens intercept the gesture as a page scroll instead of a drag.

Tap the page to select it, then use the move-left and move-right arrows instead.

"Invalid page range" alert

Why: Start > End or out of range.

Fix: Enter a valid Start ≤ End within the page count.

Wrong section reversed

Why: Range didn't match the section.

Fix: Check thumbnail numbers, re-enter Start/End.

Pages still upside down

Why: Reversing fixes page order, not orientation.

Fix: Rotate the affected pages before reversing.

PDF won't load

Why: File encrypted, corrupt, or unsupported.

Fix: Try an unlocked or repaired PDF.

Large PDF is slow

Why: Many pages use substantial memory.

Fix: Close other tabs for more memory headroom, then try again.

Password-protected PDF won't load

Why: Some password-protected or encrypted PDFs cannot be opened by the browser PDF libraries.

Fix: Unlock it first, then reverse.

Drag won't move a page

Why: Touchscreen intercepts the gesture.

Fix: Select the page, use move arrows.

Before you download the reversed PDF

A few checks can prevent an unnecessary second pass.

Check the first and last thumbnail first

If the last page of the document appears as thumbnail one, the whole file needs Full Reverse — no need to guess.

Use Custom Range for partial fixes

If only one section is out of order, reverse just that range instead of the whole document.

Fix orientation before reversing

If pages are upside down or sideways, rotate them before creating the reversed PDF so the final file has the correct order and orientation.

Keep the original file

Reversing creates a new document — keep the source PDF so you can re-run with a different range if needed.

Use blank pages as separators

Insert blank pages between sections you've reversed to mark chapter or document breaks clearly.

Rename before downloading

A clear name like "report_reversed.pdf" makes the corrected file easy to find and identify later.

Before you reverse a PDF

If something's not covered here, the troubleshooting section above likely has it.

Is it safe to process my documents?

Yes. PDF processing happens locally in your browser — files are not sent to an external server, and your original document remains untouched on your device.

How does Custom Range Reverse work?

Enter the starting and ending page numbers of the section to flip. In a 50-page document, Start=10 and End=20 reverses only pages 10 through 20, leaving pages 1-9 and 21-50 in their original order.

Will reversing the pages affect the quality of my PDF?

Reversing changes the page sequence rather than recompressing the page content. The tool does not resize or recompress pages as part of the reverse operation.

Is there a page limit?

There is no fixed page limit built into the tool. Large PDFs can require substantial browser memory because pages are rendered and rebuilt locally, so performance depends on your device and document size.

Can I reorder or delete pages before reversing?

Yes. Before reversing, you can drag pages into any order, move selected pages with the arrow controls, delete individual pages, or rotate them.

Build notes

The write-up on how this was built

Because drag-reorder, per-page rotation, and adding pages from multiple PDFs all run client-side, I wrote up the implementation — SortableJS integration, the full-vs-range reverse logic, and how inserted blank pages inherit the preceding page's dimensions when available.

Published on freeCodeCamp

How to Build a Browser-Based PDF Reverse Tool Using JavaScript

Covers page manipulation techniques, browser-based document processing, and client-side file handling that keeps documents private on the user's device.

Read the write-up on freeCodeCamp

Written by Bhavin Sheth · Founder, AllInOneTools