piapia123
en

Rotate PDF Pages

Documents

Everything runs locally in your browser — nothing is uploaded

Drop files here, or click to choose

PDF · up to 100 MB per file

Straighten pages up. A sideways scan has two possible causes and they call for opposite actions, which is why there are two modes: add (another 90° on top of the current angle) for when the reader shows it crooked — meaning the rotation flag in the file is wrong; and set (a fixed angle, overwriting) for when the content really is drawn off-angle while the flag says 0. The default is add, because what you see in the reader is the one thing you can be certain about. One caveat worth stating: this changes the page's rotation flag, not the pixels — the file stays the same size and the text stays selectable, but software that ignores the flag will still show it sideways (the FAQ covers this).

Features

  • Rotate by 90°, 180° or 90° counter-clockwise
  • Two modes: add (another 90°) and set (a fixed angle)
  • Rotate selected pages only (ranges such as 1-3,5) — handy when only a few are sideways
  • Writes the /Rotate flag, so both the reader display and printing follow it
  • The content stream is untouched: the file barely grows and text stays searchable
  • Rename the output
  • Nothing is uploaded and no server is involved

How to use

  1. Drop a PDF in
  2. Choose add or set, then the number of degrees
  3. Give a page range if only some pages need it
  4. Download and check the orientation in a reader

FAQ

It is still sideways after rotating.
Two possibilities. Either the software you are looking at ignores the rotation flag — phone gallery previews, chat thumbnails and some older readers do — in which case a real PDF reader (Acrobat, Chrome's built-in viewer, macOS Preview) will show it upright. Or the content really is drawn sideways while the flag says 0, in which case "add" merely offsets zero and comes out 90° from what you wanted; use "set" and pick the angle you need. To tell them apart: if a proper reader shows it upright and only some app shows it crooked, use add; if a proper reader also shows it crooked, use set.
Can the content be rotated for real, without relying on the flag?
That would mean rebuilding the page content stream with every drawing instruction rotated, which pdf-lib cannot do — it has no content-stream transformation. A practical workaround is "PDF to image" followed by "images to PDF": once rasterised, the orientation is baked into the pixels and every application shows it rotated. The cost is that text becomes an image, unsearchable and larger, so use it only when you genuinely need independence from the flag.
Only a few pages in the document are sideways. Can I rotate just those?
Yes. Put page numbers or ranges in the pages field (`3`, `1-3`, `5,8-10` all work). Mixed orientations are common — a landscape table scanned in the middle of a portrait document, say — and each page carries its own angle, so a single file can hold 0°, 90° and 180° pages at once.
Is the file uploaded?
No. It changes one field inside the PDF, in browser memory, with no network requests, and it works offline.

Related tools