PDF Rotate Pages
Rotate individual or all pages in a PDF by 90, 180, or 270 degrees.
Reviewed by Aygul Dovletova · Last reviewed
Drop a PDF file here or click to upload
Rotate individual or all pages
How to Rotate PDF Pages
- Upload a PDF and wait a moment while the tool reads the page count and builds a grid of page tiles. Each tile shows the page number and its current rotation.
- Select the pages you want to rotate. Click tiles individually to toggle them, use the "All" button to select every page, or "None" to clear the selection. Selected tiles get a colored outline.
- Apply rotation with the "+90", "+180", or "+270" buttons. The values accumulate: clicking +90 twice is the same as clicking +180. The tile icons rotate in place so you can visually confirm before saving.
- Click "Save Rotated PDF" to generate the output. The file downloads as
rotated.pdfand your original is untouched.
What Rotation Actually Changes in the PDF
The tool uses pdf-lib's page.setRotation(degrees(n)) method, which writes an entry to the page dictionary's /Rotate field. That field is defined in ISO 32000-2 clause 7.7.3.3 and must be a multiple of 90: 0, 90, 180, or 270. When a compliant reader opens the page, it rotates the final rendered output by that angle before displaying it. Crucially, the content stream itself is not touched: the drawing operators ("Tj" for text, "re" for rectangles, "Do" for XObjects) stay exactly where they were. That is why rotation is lossless: you are editing a single integer per page, not re-rendering anything. When pdf-lib saves the file, it serializes the page dictionary with its new /Rotate value and regenerates the XRef; every other byte on that page is untouched.
Real Workflows That Need Rotation
- Fixing a scanned contract where the auto-feed pulled every third page in sideways.
- Flipping a landscape engineering drawing that opens upside down because the scanner inferred orientation incorrectly.
- Correcting a spreadsheet exported to PDF in portrait when landscape was intended, before sending it to a finance reviewer.
- Rotating a signed receipt you photographed with a phone so it sits right side up in an expense report.
- Straightening a single misaligned page in an otherwise clean document so a downstream OCR step does not stumble.
- Preparing an academic appendix where figures were laid out landscape in a portrait manuscript and need to be reoriented before submission.
Edge Cases and Pitfalls
Rotation stacks: if a page already has /Rotate 90 and you click +90, the output becomes /Rotate 180, not a second +90 on top of the rendered image. Some PDF producers write the rotation as an inverse transform inside the content stream rather than as a /Rotate entry; this tool edits /Rotate only, so visually-rotated pages from those producers may need a different tool or a trip through Ghostscript. Form fields retain their defined positions relative to the unrotated content stream, which can make rotated forms look misaligned in a filling session; annotate or rotate before adding fields if possible. Digital signatures cover the file bytes and are invalidated by any /Rotate change. Some older readers ignore /Rotate on print output but honor it on screen, so a rotated page can print in its pre-rotation orientation; the workaround is to actually rotate the content via Ghostscript when print output must match screen.
The /Rotate Entry in the PDF Spec
ISO 32000-2 clause 7.7.3.3 specifies that /Rotate is an integer attribute on a page dictionary (or inherited from a parent /Pages node) that must be a multiple of 90 in the range of 0 to 270. Conforming readers interpret the value as a clockwise rotation applied after the page is rendered, measured in degrees. This makes rotation a purely viewport-level operation that leaves bounding boxes, text extraction offsets, and the /MediaBox untouched. PDF/A (ISO 19005) allows /Rotate as long as the value is one of the four legal multiples of 90, so rotation stays compatible with archival requirements. Form fields and annotations have their own separate rotation handling in ISO 32000-2 clause 12.5, which is why they do not always re-align with a rotated page without additional edits.
Alternatives for Batch Rotation
For a one-off fix, this browser tool is the fastest path. For batches, qpdf --rotate=+90:1,3,5 input.pdf output.pdf rotates specific pages on the command line with surgical precision; the syntax +90:all rotates every page. pdftk input.pdf cat 1south 2east 3north output rotated.pdf uses compass-like qualifiers and is good for automating complex mixed-orientation documents. mutool poster -r 1 input.pdf out.pdf is an option for full-document rotations. macOS Preview rotates the visible page with Tools -> Rotate Left/Right and saves in place; it is limited to one page at a time unless you hold Cmd to multi-select in the sidebar. Adobe Acrobat Pro offers the most forgiving UI for complex mixed rotations and is the right tool if your job regularly requires mixing orientations across hundreds of pages.
Frequently Asked Questions
Does rotation re-render or re-compress the page?
No. The tool only writes a new /Rotate integer into each selected page dictionary; every content stream, every embedded font, and every image XObject stays identical to the source. The output file is the same pixel-for-pixel when it is finally displayed, just rotated at display time. That is why rotation is fast even on hundred-page documents and why it never introduces any quality loss.
Can I rotate different pages by different amounts?
Yes. Select one subset of pages, apply the rotation you want, then select a different subset and apply a different rotation. The per-page angle shown on each tile is independent; nothing is committed to the output until you click Save. This makes it straightforward to fix a PDF that has a few landscape pages among portrait ones without touching the correctly-oriented pages.
What does the angle number on each tile mean?
It is the cumulative rotation that will be written to that pages /Rotate field when you save, expressed in degrees clockwise relative to the original orientation. A 0 means the page is untouched; 90 means rotated one-quarter turn clockwise; 180 means upside down; 270 means one-quarter turn counter-clockwise. Additional rotations add to the shown angle modulo 360.
How do I undo a rotation?
Apply a rotation that brings the cumulative angle back to 0 (a reverse-direction rotation, or enough +90 clicks to reach 360). Alternatively, re-upload the original file, which resets all page angles. Saving and re-uploading the output is also an option if you want to freeze the current rotations and then undo relative to that state.
Why does my rotated page still look wrong in a different reader?
Some reader implementations are lax about /Rotate, especially when printing. If the page was created with a rotation baked into the content stream itself rather than expressed as /Rotate, this tool can only stack an additional rotation on top, which may double-rotate visually. In those cases, use Ghostscript with the -dAutoRotatePages=/None flag and explicit page rotation to rewrite the content stream instead of the page dictionary.
Are form fields and annotations rotated too?
Annotations have their own rotation semantics in ISO 32000-2 and may or may not re-align with the rotated page depending on how they were authored. Stamps and text annotations usually rotate with the page; form fields often stay in their original positions relative to the media box. For complex forms, rotate first and add or re-author fields afterward to avoid misalignment.
Is the file uploaded to a server?
No. The rotation happens entirely in your browser with pdf-lib running as JavaScript. The tool reads your file into an ArrayBuffer via the File API, modifies the page dictionaries in memory, and writes a new ArrayBuffer that becomes a download. There is no server endpoint, no websocket, and no file-content telemetry; the only outbound traffic is the usual anonymized page-view ping.
Does rotating affect bookmarks or cross-page links?
No. Bookmarks point at page numbers and top-of-page coordinates in the un-rotated coordinate system, and /Rotate applies at display time. Link annotations behave the same way. You may notice that a link that previously pointed at the top of a page now lands at what visually looks like the left edge after a +90 rotation, because the rotation moves the display origin while the link target stays in the pages own coordinates.
Can I rotate a page by a non-90-degree angle, say 45 degrees?
No. ISO 32000-2 restricts /Rotate to multiples of 90; arbitrary angles are not representable in the page dictionary. If you need a 45-degree rotation, it must be baked into the content stream with a transform matrix (cm operator), which is a much more invasive operation. Use a PDF editor like Scribus or run the content through a script that wraps every page with a rotation matrix.
Will rotated pages print correctly on every printer?
Most modern print drivers honor /Rotate and print the page in its rotated orientation. A handful of older drivers ignore /Rotate on spool and print in the source orientation. If you run into this, either re-generate the PDF with Ghostscript -dAutoRotatePages=/None plus explicit content-stream rotation, or print through a bridge like Preview that respects /Rotate at the spool stage.
More PDF Tools
Image to PDF
Combine multiple JPG and PNG images into a single PDF document.
Open toolPDF Compressor
Compress PDFs with Ghostscript image downsampling. Pick a quality preset. Files auto-deleted after 15 minutes.
Open toolPDF Merge (Server-Side)
Merge up to 20 PDFs into a single document on our EU servers using qpdf. Files auto-deleted after 15 minutes. Handles large or password-cleared inputs the in-browser merger cannot.
Open toolPDF Merger
Merge multiple PDF files into a single document with drag-and-drop reordering.
Open toolPDF Page Reorder
Rearrange pages in a PDF document with a visual drag-and-drop interface.
Open toolPDF Password Protect
Add AES-256 password protection to PDF files via qpdf. Files auto-deleted after 15 minutes.
Open tool