SmallNook

Rotate PDF

Drag a PDF here to turn its pages the right way upor click to browse

Some of these pages shouldn't be in the file at all? Take them out

About this tool

How this PDF rotator works

Drop the file and every page turns up as a picture. Click one and it swings a quarter turn to the right, in place, so you are looking at the result before you commit to it. Click again for another quarter. The ↺ button in the corner goes counter-clockwise, shift-click carries the same turn across a run of pages, and the two pills on the status line spin the whole document at once.

The turns you queue are relative. pdf.js already applies whatever rotation a page carries when it paints the preview, so a scan that arrives sideways is upright in the grid, and one more click means a quarter past what you can see. When you press the button, pdf-lib adds the same quarter to the same stored angle, folding 270 plus 90 back to 0 instead of writing a /Rotate of 360.

Rotation in a PDF is one number on the page, not a redraw of it. Your text stays selectable, the images stay the images you started with, and nothing in the file is re-encoded. Both libraries download on your first click and everything after that runs in the tab.

The scans this fixes

  • A stack of receipts through a scanner, where three came out landscape.
  • A statement someone fed in upside down.
  • A slide deck exported portrait that a projector wants landscape.
  • A document you rotated in Preview or Acrobat's viewer, where the turn was a view setting and the file came out unchanged.

What this tool cannot do

Straighten a crooked scan. A page that came in three degrees off comes out three degrees off. PDF stores orientation as a flag reading 0, 90, 180 or 270, and pdf-lib answers anything else with `degreesAngle` must be a multiple of 90.

Turn the ink instead of the page. The page box keeps its original width and height and gains an instruction to display sideways: an A4 page turned a quarter still measures 595 by 842 afterwards. Readers honor the flag. A handful of thumbnailers and email previewers read the box and will still show you the old orientation.

Decide for you. Nothing here reads the text to work out which way is up. You look at each page and click.

Make the file smaller, or bigger in any way you can trust. Turning all 12 pages of our test document writes 13,202 bytes where 25,842 went in, and loading that same file and saving it with no rotation at all writes 13,199. The saving is pdf-lib packing the document differently, not the rotation, so the download row prints the result's size and no percentage.

Open an encrypted PDF. A document carrying an /Encrypt dictionary is closed to pdf-lib, and that covers the permission-only locks that open in any reader without asking for a password.

Keep a digital signature verifying. A signature covers the exact bytes it was made over, and pdf-lib has no incremental-save path: the file goes out whole, so the check fails afterwards even though nothing on the signed page moved.

Reorder or remove. This handles one document at a time, and turning pages is all it ever does to it.

Frequently asked questions

Why did my reader ignore the rotation?

Almost none do. If a preview pane still shows the old orientation, it is reading the page box rather than the rotation flag, which is a shortcut some thumbnailers take. Open the file properly and the page is where you put it.

Does the page count or size change?

Neither. The same pages come out in the same order at the same dimensions, with one number changed on the ones you clicked.

What happens to a page that was already sideways?

The grid shows it upright, because pdf.js applies the stored rotation before painting. Your click is measured from what you see, so a page stored at 90 that you turn once is stored at 180. Turning it four times brings it back to 90 rather than piling up to 450.

How long does a long document take?

You wait on the grid. Page one appears around 0.8 seconds after the drop and page three hundred around 5.6 seconds, on a desktop. Saving costs a fifth of a second whether you turned one page or all three hundred.

Does anything about my file get sent?

No. Everything happens inside the tab. Your click fetches the two PDF libraries from this site, and a page carrying a JPEG 2000 or JBIG2 scan makes pdf.js ask for one extra decoder file to paint that preview. Your document is never part of any request.

Can I rotate by an exact angle?

Not here, and not anywhere that writes a real PDF rotation. Quarter turns are all the format stores. Anything finer has to redraw the page as a picture, which costs you the selectable text.