# Rotate PDF

URL: https://hifreetools.com/pdf/rotate-pdf

> Open a PDF, pick a rotation (90° clockwise, 90° counter-clockwise, or 180°), choose all pages or specific ones, and download the rotated PDF. It all runs in your browser, so your file is never uploaded.

## Quick answer

To rotate a PDF, open it here, choose the rotation amount (90° clockwise, 90° counter-clockwise, or 180°), and either leave the page selection as the whole document or list specific pages like 1-3, 5. The tool adds your rotation on top of each page's current orientation and downloads the result. It runs entirely in your browser with pdf-lib — nothing is uploaded and there is no watermark.

## Formula

- New page rotation: newAngle = (currentAngle + chosenRotation) mod 360

Your PDF is read locally. Rotation in a PDF is stored as a page property (a multiple of 90 degrees), so the tool reads each selected page's current rotation and adds your chosen amount, wrapping around 360 degrees (for example, a page already at 90° rotated by another 90° becomes 180°). Pages you don't select keep their orientation. The content itself is not re-drawn — only the page's rotation flag changes — so there is no quality loss. The updated PDF is then saved and downloaded, all on your device.

## Examples

- Turn a sideways scan upright: A landscape-scanned page at 0°, rotate 90° clockwise → The page now displays rotated 90° clockwise
- Flip the whole document 180°: A 6-page PDF, rotate 180°, pages 1-6 → All 6 pages flipped upside down
- Rotate only one page: A 10-page PDF, rotate 90° counter-clockwise, pages: 4 → Only page 4 is rotated; pages 1-3 and 5-10 are unchanged

## FAQ

**Is my file uploaded to a server?**
No. The rotation runs entirely in your browser with pdf-lib — your PDF is read locally, the rotation flags are changed, and the new file is downloaded. Nothing is sent to a server.

**Does rotating reduce quality?**
No. Rotation only changes a page property; the page content is not re-rendered, so text and images keep their original quality.

**Can I rotate just some pages?**
Yes. Enter the pages or ranges to rotate (like 1-3, 5). Leave the default 1-to-last to rotate the whole document.

**What rotation amounts are available?**
90° clockwise, 90° counter-clockwise (which is 270°), and 180°. Apply the tool twice if you need a different combination.

**Why won't my PDF open?**
It may be password-protected/encrypted or corrupted. Unlock or repair it elsewhere first, then load it again.

**Is there a watermark?**
No. The output is a clean PDF with no watermark and no added content.


## Sources

- [pdf-lib — create and modify PDFs in JavaScript](https://pdf-lib.js.org/)

Runs in the browser; nothing is uploaded. Cite as: HIFreeTools, "Rotate PDF", https://hifreetools.com/pdf/rotate-pdf
