Rotate PDF
Rotate all pages or a range by 90, 180 or 270 degrees — processed in your browser, never uploaded.
1,114 views
How It Works
Every page in a PDF has a page dictionary — a small block of metadata describing that page — and one of its optional entries is /Rotate, which accepts a value of 0, 90, 180 or 270 degrees. This tool, using the open-source pdf-lib library running entirely in your browser, simply writes a new value into that single attribute for the pages you select. Critically, /Rotate is a display instruction, not a content transformation: the page's underlying content stream — the actual drawing commands that place text and images at specific x/y coordinates — is left completely untouched. A PDF viewer or printer reads the /Rotate value at render time and rotates the whole page canvas by that amount before drawing it, the same way a phone screen rotates a photo without altering the photo's pixel data.
That separation between "what is drawn" and "how it is displayed" is exactly why rotation through this route is effectively free: there is no re-rendering, no re-compression of images, no recalculating of text positions. Changing /Rotate is a metadata edit on the order of bytes, not a graphics operation, so it completes instantly even on large files and the output file size stays essentially identical to the input.
Example: a phone-scanned document that comes out sideways because the phone was held in landscape orientation is not actually drawn sideways — its content stream places text along what the file considers the "correct" axis, and the page dictionary happens to have no /Rotate value (or the wrong one) telling viewers to turn it. Setting /Rotate to 90 or 270 on those pages fixes the displayed orientation without touching a single character of the underlying content.
What to Know
- Zero quality loss, by construction: since content is never redrawn, rotating a page a hundred times back and forth produces byte-identical results to rotating it once — there is no cumulative degradation the way there is with repeated JPEG re-saves.
- Instant even on large files: because it is a metadata change rather than an image operation, rotating a 500-page PDF takes no longer than rotating a 5-page one.
- Password-protected files need unlocking first: the tool needs to read and rewrite the page dictionaries, which is not possible on an encrypted PDF until it is decrypted.
- Some viewers ignore /Rotate inconsistently: the vast majority of modern PDF viewers and printers respect it correctly, but a handful of very old or minimal renderers may not — if a rotated file looks wrong somewhere, it is worth testing in a mainstream viewer like a browser's built-in PDF viewer first.
Frequently Asked Questions
Will rotating reduce quality?
No — the page content is never re-rendered; only the page dictionary's /Rotate attribute changes, a display flag that PDF viewers use to decide how to draw the page. File size stays essentially identical before and after.
Can I rotate different pages in different directions?
Yes, in two passes: rotate range A first, download the result, then load that output file back into the tool and rotate range B — each pass only touches the /Rotate value on the pages you specify.
Why is rotation instant even on a huge file?
Because it edits a small metadata value per page rather than redrawing any content — the actual text and image drawing instructions inside each page are never touched, so there is nothing computationally heavy to do.
Does rotating change the page's width and height values?
No — the page's stated MediaBox dimensions stay as they were; /Rotate is a separate instruction telling the viewer to display that same box turned by 90, 180 or 270 degrees.
My scanned PDF is password-protected — can I rotate it directly?
Not directly — an encrypted PDF's internal structure, including its page dictionaries, cannot be read or modified until the password is removed, so unlock the file first with a decryption tool, then rotate it here.
Similar Tools
Report a Problem
Rotate PDF
Comments
No comments yet — be the first to write one!