Sort Pages by Orientation - Free Online Browser Tool

Group portrait pages before landscape ones, keeping the order inside each group untouched.

A document assembled from several sources often has its shape change halfway through: a portrait report with a landscape table spliced in, a portrait deck with a wide chart on one page. Printing it duplex means the wide page rotates on the sheet and the backs come out misaligned. The fix is to separate the shapes, print them their own way, and put the document back together afterwards. This groups the pages so each shape is dealt with separately, and it is careful about what it promises. The grouping is stable: pages keep their relative order inside their group, so a document with forty portrait pages in a row comes back in exactly that sequence rather than shuffled for no visible reason. Sorting by shape is not a licence to reshuffle. Orientation is read from each page's own width and height, which is how the page will actually be printed. A landscape image that has been placed on a portrait page counts as portrait here, because that is the shape of the sheet it lands on - and that is usually what you want for duplex alignment, though it is worth knowing if you were expecting the image itself to be the answer. Square pages are their own case rather than being quietly filed under portrait, since a square is neither and lumping it in would decide something you did not ask about. They go to the end by default and can be moved to the front. If the file is entirely one shape there is nothing to group, and the tool says so instead of handing back an identical copy with a reassuring summary. Everything runs in this tab.

This sort pages by orientation 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 Sort Pages by Orientation Tool

Four steps, and the whole thing runs locally on your own device.

  1. Add the PDF

    One file. Every page's dimensions are read - this is metadata, so it is fast even on a long document.

  2. Choose which group comes first

    Portrait first is the usual choice for duplex alignment, since the portrait sheet is the one you are stapling. Landscape first suits a binder that opens on the wide edge.

  3. Decide where square pages go

    End by default. A square page is neither shape, so it is kept out of both groups rather than being folded into one.

  4. Save

    One PDF grouped by shape, with a summary giving the page numbers in each group and the resulting order, so you can check the split before committing to a print run.

Frequently Asked Questions

Will it shuffle my pages within each group?

No, and that is deliberate. The grouping is stable, so pages keep their relative order inside portrait and inside landscape. Sorting a document by shape should not also scramble the chapters - if your pages came back reordered within a group, that would be a bug, and there is a test that fails if the behaviour changes.

How does it tell portrait from landscape?

By comparing each page's width against its height - taller than wide is portrait, wider than tall is landscape, and exactly equal is square. It reads the page dimensions rather than looking for a rotation flag, which means it reports the shape the page will be printed at. A landscape image placed on a portrait page therefore counts as portrait.

What happens if the document is all one shape?

You get told there is nothing to group, and no file is produced. An all-portrait document sorted by orientation comes back identical, and handing that over with a summary implying it had been sorted would be misleading - it is more useful to say the tool does not apply here.

Does this lose bookmarks or links?

The pages are copied with their content intact, including any bookmarks and links attached to them, so nothing is flattened. One caveat worth stating: reordering moves pages, and a link that pointed at a page which has moved will follow the page to its new position rather than staying on the page number it was written for.

Why does it refuse a document that is only one shape?

Because there is no grouping to do, and returning an identical copy with a summary claiming it had been sorted would be misleading. Grouping by orientation only means something when both shapes are present, and it is a grouping rather than a rearrangement: for an arbitrary sequence, Reorder Pages is the tool that takes a list you write yourself.