keptlocal
Files never leave your browser

Rotate PDF

Upload a PDF, choose a rotation, and optionally target specific pages. Downloads instantly. Nothing is uploaded.

Drop a PDF here, or

One PDF at a time. Files never leave your browser.

Upload a PDF to get started.

How to rotate PDF pages

  1. Drop your PDF into the zone above, or click to browse.
  2. Choose the rotation amount — 90° Left (counter-clockwise), 180° (upside down to right-side up), or 90° Right (clockwise).
  3. Choose which pages to rotate: All pages applies the rotation to the whole document. Specific pages lets you enter a range like 1, 3, 5-8 to target individual pages only.
  4. Click Rotate & download. The corrected PDF saves directly to your device.

Everything runs in your browser using pdf-lib. No file is sent to a server — open DevTools (F12) → Network while rotating to verify zero upload requests.

When to rotate a PDF

  • Fixing a sideways scan — a flatbed scanner or phone camera scan of a landscape document often produces a portrait PDF with the content rotated 90°. One click corrects it permanently.
  • Correcting a PDF created from a mobile photo — phones sometimes mismatch EXIF orientation metadata with the image data, producing an upside-down or sideways PDF.
  • Rotating a single inserted page — you merge a landscape chart into a portrait report; the chart page needs to be rotated 90° to match the reading direction.
  • Fixing a scanned signature page — someone scanned a signed page upside down before returning it. Rotate 180° and it is ready to archive.
  • Correcting a batch of invoices — a multi-page scan came back entirely sideways; rotating all pages at once saves editing each individually.

How it works under the hood

PDF pages store a rotation value as part of their metadata — it can be 0°, 90°, 180°, or 270°. This value tells PDF viewers and printers how to orient the page when displaying it. The actual page content (text, images, vector graphics) is stored in its original orientation and rendered with a coordinate transform applied.

pdf-lib reads the current rotation value for each targeted page using page.getRotation().angle, adds the chosen rotation amount, and writes the new value with page.setRotation(degrees(...)). The operation modifies only this metadata field — content bytes are untouched, which means text stays selectable, images stay at full resolution, and file size barely changes.

Because the rotation is cumulative (added to the existing value), a page already rotated 90° that receives another 90° rotation ends up at 180°. If you need to reset a page's rotation entirely, rotate it by whatever angle brings the total back to 0°.

Limits and what to expect

  • Rotation increments: PDF only supports multiples of 90°. Arbitrary angles (like 45°) are not possible in standard PDF — that would require re-rendering the content, which this tool does not do.
  • Existing rotations are cumulative: if a page already has a 90° rotation stored, adding 90° right will bring it to 180°. Add 270° (90° left) to counteract an existing 90° right rotation.
  • Password-protected PDFs: the tool attempts to load encrypted PDFs with the ignoreEncryption flag. PDFs that require a password to view their content will fail — unlock them first.
  • File size: rotation changes only PDF metadata, so the output file is virtually identical in size to the input.
  • Browser support: Chrome 90+, Firefox 90+, Safari 15+, Edge 90+.

Privacy: what happens to your file

Your PDF is read into browser memory and rotated locally. Nothing is sent to a server. The corrected file is assembled in memory and downloaded directly to your device — the data is local from start to finish.

For sensitive documents — medical records, legal filings, financial statements — this architecture means there is no third-party server to trust or track. Open the Network tab in DevTools while rotating to see zero outbound file transfers.

Frequently asked questions

Are my files uploaded to a server?
No. Rotation runs entirely in your browser using pdf-lib. Your PDF never leaves your device — open DevTools → Network while rotating to confirm no upload requests.
Can I rotate only specific pages?
Yes. Leave 'Apply to' set to All pages to rotate everything, or enter a page range like '1, 3, 5-8' to target specific pages. The rest of the document is left unchanged.
Does rotating change the page content or quality?
No. pdf-lib sets the PDF rotation flag on each page — this tells PDF viewers how to display the page. The underlying content is untouched, so text stays selectable and images stay sharp.
My PDF already has some rotated pages — will this make it worse?
The rotation you choose is added to each page's existing rotation. So if a page is already rotated 90° and you apply 90° clockwise, the result is 180°. Use the preview in your PDF reader after downloading to check.
Is there a page or file size limit?
No hard limit. The practical ceiling is your device's available RAM.
Will bookmarks and annotations be preserved?
Yes. The tool only changes rotation metadata. All other document structure — bookmarks, annotations, form fields, embedded fonts — is preserved.