Just File Tools

PDF Rotate

Rotate individual pages or the whole document by 90/180/270 degrees

Drop a PDF. Each page is shown as a thumbnail with rotate buttons.

Max file size: 50MB

Files are processed in your browser. Nothing is uploaded.

How to PDF Rotate Online

Rotate individual pages of a PDF by 90, 180, or 270 degrees, or rotate the whole document at once.

  1. Drop a PDF. Each page renders as a thumbnail with rotate-left / rotate-right buttons.
  2. Click the rotate buttons on individual pages, or use 'Rotate all left' / 'Rotate all right' to apply to every page at once.
  3. The thumbnails preview the rotation live, so you can see what the final output looks like before saving.
  4. Click 'Apply rotations and save' to write the new PDF. Download with one click.

About PDF Rotate

Rotating PDF pages comes up more often than you'd expect. A scanned document where one page was fed in upside-down. A photo-captured PDF where the camera was held sideways. A multi-page form that needs landscape pages for tables and portrait pages for everything else. A receipt scan rotated by the auto-orient feature of a phone's camera app. In every case, you want one or more pages rotated, the rest left alone, and the whole thing saved as a single PDF that opens correctly anywhere.

This tool does that operation cleanly. Drop a PDF, see every page as a thumbnail, click rotate buttons on the pages that need it, save the result. The implementation is two-stage: **pdf.js** renders the thumbnails so you can see what you're rotating, and **pdf-lib** applies the rotation to the actual PDF when you save.

The way rotation works in PDF is interesting and worth knowing. PDF pages have a built-in `/Rotate` attribute (0, 90, 180, or 270 degrees, no other values). Setting this attribute tells every PDF viewer to display the page with that rotation, without actually re-rendering the content. The page's underlying drawing instructions (the text, the lines, the images) don't change at all — only the display-rotation flag changes.

The advantages of this:

- **Lossless.** No image quality is lost; no text is re-rendered; nothing is approximated. - **Fast.** Saving a 100-page PDF after rotation takes milliseconds because only ~100 numbers change. - **Tiny file size impact.** The output PDF is essentially the same size as the input — within a few bytes. - **Compatible.** The `/Rotate` attribute has been in the PDF spec since version 1.0; every PDF viewer respects it.

The disadvantage: rotation is **only at 90-degree intervals**. The PDF spec doesn't support arbitrary rotation angles for whole pages. If you need a page rotated by 5 or 15 degrees (e.g., for a deliberately tilted layout), you'd have to redraw the content inside the page, which is what graphic-design tools do. For the everyday "this page is upside down" case, 90/180/270 is exactly the right primitive.

**Per-page vs whole-document rotation.** Both are common. Per-page is for fixing scanner accidents — one page was put in sideways, the rest are fine. Whole-document is for portrait-vs-landscape orientation mismatches — the source was scanned in the wrong orientation throughout, and every page needs the same rotation. The "Rotate all" buttons make the second case a single click.

**Live preview.** The thumbnails rotate visually in the browser as soon as you click a rotate button. You see exactly what the saved output will look like before committing. The CSS `transform: rotate(Ndeg)` matches the PDF `/Rotate` attribute pixel-for-pixel.

**Saving is one click.** Apply rotations, get a download. The output filename gets a `-rotated` suffix to distinguish from the original. You can keep adjusting rotations and re-save as many times as you want; each save produces a fresh download.

**Privacy.** Both pdf.js (thumbnail rendering) and pdf-lib (rotation application) run as JavaScript in your tab. The PDF is read into memory via the File API and processed locally. No network, no server, no upload. Verify in DevTools — the network panel is empty during operation. This is the same privacy posture as every other PDF tool on this site.

**Edge cases handled:**

- **PDFs with existing rotation.** If a page already has `/Rotate: 90` (because the original creator rotated it), this tool's rotation adds to the existing value rather than replacing it. So rotating an already-90°-rotated page by another 90° lands you at 180°, which matches user expectation. - **Mixed page sizes.** Pages of different dimensions (e.g., A4 mixed with Letter mixed with the long page that's actually a receipt) all rotate independently. Thumbnails preserve aspect ratio. - **Empty PDFs / single-page PDFs / 500-page PDFs.** Thumbnail rendering is linear in page count; the rotation operation itself is O(N). Practical limit is browser memory, which fits 1000+ page PDFs in most cases. - **Object URL lifecycle.** Both thumbnail URLs and the final download URL are properly revoked when the component unmounts or when a new file is loaded. No memory leaks across multiple files.

**What this tool deliberately doesn't do:** modify the page content. The rotation is purely the PDF's display-rotation flag. If you need to redraw text on a rotated page (e.g., "I want the text horizontal after rotating the page"), that's a different operation entirely — you'd need a PDF editor like Adobe Acrobat Pro or LibreOffice Draw. For the everyday rotation use case, this tool's lossless flag-based approach is exactly what you want.

Frequently Asked Questions

Why does only some pages need rotation?

A common case is a scanned document where one page was put through the scanner upside-down or sideways. The rest of the PDF is fine; just one or two pages need to be flipped 90° or 180° to read normally. Per-page rotation handles this without affecting the rest. The other case is a PDF where the camera scan was taken in portrait but the document is landscape — every page needs the same rotation, which the 'Rotate all' buttons cover.

Is this the same as flipping?

No. **Rotate** turns the page 90/180/270 degrees clockwise or counterclockwise. **Flip** (mirror) is a different operation that reverses the page left-to-right or top-to-bottom. PDFs rarely need flipping — that's mostly an image operation. If you actually need to flip a PDF page, the workflow is: PDF to Image (extract each page as PNG), Image Rotate / Flip (flip the PNGs), Image to PDF (reassemble). All three tools are on this site.

Does it re-encode the PDF or just change a flag?

It changes the rotation flag. PDF pages have a built-in `/Rotate` attribute (0, 90, 180, 270) that tells the viewer how to display the page. Rotating a page just sets this attribute; the underlying content stream is unchanged. The advantage: lossless and fast (no re-rendering). The cost: zero — the output PDF is essentially the same file with one number changed per modified page.

Why does my rotation 'stick' even after a fresh open?

Because the rotation is now part of the PDF, not a viewer preference. Many PDF viewers offer a 'View → Rotate View' option that rotates the display temporarily without modifying the file; when you close and reopen the PDF, the rotation is gone. This tool modifies the *file*, so the rotation persists across viewers and across re-opens. That's the difference between a view setting and a saved edit.

Does it work on encrypted PDFs?

No. pdf-lib can't decrypt password-protected PDFs in the browser. Decrypt externally first, then rotate the unencrypted version here.

What if my PDF has thousands of pages?

Thumbnail rendering scales with page count — a 500-page PDF takes a few seconds to render all thumbnails because each page goes through pdf.js. After that, applying rotations is fast (no re-render). For very large documents, expect the initial thumbnail render to be the bottleneck. Closing the tab won't lose your selections, but reload will start from scratch.

Is the PDF uploaded to a server?

No. pdf.js renders thumbnails inside your browser. pdf-lib applies rotations inside your browser. The file never leaves your tab. Verify in DevTools — the network panel is empty during operation.