What the Rotate PDF does
Rotate PDF opens one PDF, reports its page count, and lets you turn either every page or a list of pages by 90, 180 or 270 degrees. The result is offered for download as the original name with -rotated added, so scan.pdf becomes scan-rotated.pdf, and the message confirms how many pages were turned and by how much.
The rotation is applied by setting each page's /Rotate value, the same attribute a PDF viewer reads to decide how to display the page. The PDF standard restricts it to multiples of 90, which is why those are the only options. Because the content stream is not touched, text stays selectable, images keep their resolution, and the file size barely changes.
A detail that matters for already-rotated files: the tool adds your angle to whatever rotation the page carries. A page stored with 90 degrees that you turn by 90 ends at 180. This keeps repeated corrections predictable, and it means 270 undoes a 90 you applied by mistake.
How to use it
Choose a PDF
Select one file. The page count appears under the All pages option once pdf-lib has read it; encrypted files are refused at this point with a message.
Pick the pages and the angle
Leave All pages selected, or switch to Selected pages and type a list such as 2, 5-7. Then choose 90, 180 or 270 degrees.
Rotate and download
Press Rotate. A download card shows the copy with -rotated in the name; press Download to save it. Your original file is not modified.
Which angle to choose
In PDF, the rotation value turns the page clockwise when displayed. 90 is a quarter turn clockwise, which fixes a page whose top edge is on the left. 180 flips an upside-down page. 270 is three quarter turns clockwise, the same as one quarter turn counter-clockwise, for a page whose top edge is on the right. The buttons carry those descriptions so you do not have to work it out.
Every page in the selection receives the same angle in one run. If some pages need 90 and others 270, run the tool twice: rotate the first group, then open the downloaded file and rotate the second group. Since the content is never redrawn, there is no quality cost to chaining runs.
Selecting pages
The Selected pages field accepts comma-separated page numbers and hyphenated ranges, for example 1, 3-5, 8, using positions counted from the first page. Entries outside 1 to the page count, or ranges written backwards, are rejected with a message and nothing is downloaded. Listing a page twice rotates it once.
There is no page preview, so you need to know which pages are wrong before you start. Open the PDF in your viewer, note the page positions, then enter them here. If the result is not what you expected, rotate the output again rather than the original, since each run adds to the existing rotation.
Rotation attribute versus rotated content
Some tools rotate a page by redrawing its content at an angle onto a new page. This tool does not. Changing the attribute is quick, reversible and lossless, but one consequence is worth knowing: a program that ignores the rotation attribute, which can happen in some print pipelines or image converters, will still see the page in its stored orientation. Mainstream viewers and printers honour the attribute.
Limits to know before you rely on it
- No preview of pages; you must know which pages to rotate before you start.
- One angle per run for all selected pages; mixed corrections need two or more runs.
- Encrypted or password-protected PDFs cannot be opened and are refused on selection.
- Only multiples of 90 degrees are possible, because the PDF rotation attribute allows nothing else.
- Software that ignores the page rotation attribute will still show the stored orientation.
Questions people ask about the Rotate PDF
Does rotating a PDF this way reduce quality or change the file size much?
No. The page content is not decoded or redrawn; only a small rotation value on each page is changed. Text remains selectable and searchable, and the saved file is almost the same size as the original.
What happens if the page already has a rotation set?
Your angle is added to it and the total is wrapped at 360. A page stored at 270 that you rotate by 90 ends up at 0, which is how the tool can straighten a page that another program left turned.
How do I rotate just one page in a long document?
Choose Selected pages, type that page's position, for example 14, pick the angle and press the button. Every other page is left exactly as it was.
Which way does 90 degrees turn the page?
Clockwise. The top of the page moves to the right-hand side. Use 270 if you need the top to move to the left, which is the same as turning counter-clockwise by a quarter.
Can I rotate a password-protected PDF?
Not while it is protected. pdf-lib will not load an encrypted file and the tool shows a message as soon as you select it. Remove the password in the originating application first, with permission from the owner.
Is the file uploaded to be rotated?
No. pdf-lib runs in your browser, changes the page attributes there, and hands the new bytes to a temporary download URL. Your PDF never leaves your device.
Sources and further reading
- pdf-lib API reference for PDFPage: getRotation and setRotation, the calls that change the page attribute
- pdf-lib API reference for PDFDocument: load, getPage and save, used to open and write the file
- Library of Congress description of PDF 2.0 (ISO 32000-2), the standard that defines the page rotation attribute