How to rotate a PDF online — without uploading to a server

pdf, rotate, in-browser

A scanned contract came back upside down — all 47 pages. Re-scanning is slow, there is no Acrobat licence at hand, and installing a desktop office suite for a single rotation makes no sense. Rotating a PDF is not even a document rebuild — it is a single-field edit in the metadata. It happens instantly and without a server.

Below is exactly that tool. Drop in your PDF and pick an angle. If you need only some pages, list the numbers separated by commas (1,3,5-7 means pages 1, 3, 5, 6 and 7). Rotation is clockwise and adds to the current angle. The file does not go anywhere.

Drop a PDF here or click to choose

PDF only, up to 100 MB

The file stays in your browser — nothing is uploaded

Rotation angle
Which pages

Why this works without a server

Every page in a PDF has a /Rotate property with a value of 0, 90, 180 or 270. When the viewer opens the file it simply rotates the contents by that angle. To rotate a page you can change one number — and that is it.

What does the work? The pdf-lib library — 440 KB of JS, loaded once and running in your browser. Open DevTools → Network, upload a file above and you will see that nothing goes outside the page except the JS and CSS of the site itself.

When this will not work

The method changes the orientation of a page but not its content. If a page has one large scanned image embedded inside it together with margin text, rotating the page will rotate the image along with everything around it — captions, stamps, page numbers. In that case you need an editor that can break the page apart into objects and rotate the raster insert separately. I have not yet seen one in a browser; that is usually Acrobat or something on the desktop.

"Without uploading to a server" matters more than it seems

Smallpdf, iLovePDF, PDF24 — they all upload your file to their server, process it, send back the result and promise to delete it in an hour. There is no way to verify the promise; in the Network tab you only see that the file went out. Here you can see that it did not. A privacy policy always reads well — the network tab is the honest one.

For passport scans, contracts and any documents under NDA this is critical. For a café menu that just needs to be rotated before printing it is, of course, paranoia — but paranoia here costs you nothing.

After rotating you often want to shrink the file too — for example to fit a 5 MB upload limit. For that there is compress PDF; it runs locally in your browser by default, with an optional server fallback for unusual files.

FAQ

Can I rotate just one page, or do I have to spin the whole file?
You can. In the form, switch "Which pages" to "Selected" and list the numbers separated by commas: `3` for a single page, `1,5-7` for several. The rest stay in their original orientation.
Does the PDF keep its quality after rotation?
Completely. Rotation only changes metadata — a single field in the PDF structure — the content (text, images, fonts) is not re-encoded. The file size also barely changes.
Does this work on a phone?
Modern mobile browsers (iOS Safari 14+, recent Chrome on Android) — yes. For very large PDFs (>50 MB) on older phones, memory may run out; in that case open it from a laptop instead.
What about password-protected PDFs?
pdf-lib cannot open encrypted PDFs without the password. Remove the protection first (Acrobat can do it, so can the qpdf utility) and then rotate here.
Can I undo a rotation?
Rotation is additive, so rotate in the opposite direction: after a 90° turn, do another 270° turn — 90 + 270 = 360, and the pages return to the starting position. If you need to fully revert, keep the original file before processing — it stays on your disk the whole time anyway.

Related tools