Why PDFs come out sideways
A PDF page knows two things about itself: the content (text, images, vectors drawn on the page) and a rotation flag that tells the reader which way is up. Most PDFs you make from a word processor have that flag set to 0 — the page renders the way you typed it. But the moment a scanner, a phone camera, or a "Save as PDF" from an unusual app gets involved, that flag can land on 90, 180, or 270. The content is fine. The flag is wrong. Every reader you open the file in shows the page tipped over.
The fix is not to re-scan the document or to print it out and try again. The fix is to set the rotation flag to the correct value and save. That is what the Rotate PDF tool does, and that is all it does. No re-rendering, no re-encoding, no quality loss. The pixels that were already on the page stay exactly where they were — only the "this way up" label changes.
How to use the Rotate PDF tool
The widget has three buttons and a file picker. There is no account to sign up for, no email field, no "click here for the free version with watermark" sleight of hand. Drop a PDF in, pick an angle, click Rotate, download.
- Drop or pick a PDF. Up to 100 MB. The tool reads the file and tells you how many pages it has so you know it loaded correctly.
- Pick the angle. 90° clockwise (the most common — fixes a scan that came in sideways with the top of the page on the right). 180° (flips upside-down, useful for pages that were fed face-down through a scanner). 270° clockwise, which is the same as 90° counter-clockwise.
- Click Rotate PDF. The operation is essentially instant because nothing is being re-rendered. pdf-lib walks every page and calls
setRotation; the resulting bytes are written to a new PDF in memory. - Click Download. The output filename is your input plus the angle (a file called
scan.pdfbecomesscan-rotated-90.pdf).
The file stays in your browser the entire time. Open the network tab in your devtools and click Rotate — you will see zero outbound requests. The Microapp page loaded from our CDN; everything after the page load is your machine talking to itself.
Which angle is the right one
The hardest part of rotating a PDF is figuring out which direction you need. The text on a sideways scan does not announce itself. Here is the decision tree we use:
Look at where the text starts reading from. If the first word of the paragraph is at the top-right and you read down toward the bottom, you need 270° clockwise (or 90° counter-clockwise — same thing). If the first word is at the bottom-left and you read up, you need 90° clockwise. If the page is upside-down (text reads right-to-left along the top), pick 180°.
If you guessed wrong, undo and try again. Rotation is non-destructive in the strict sense — re-running the tool with a different angle on the original input gives you a different output every time. The tool uses setRotation, which replaces the existing rotation rather than adding to it, so if you rotate a page that was already at 90° and you pick 90° again, the output is still at 90°. To stack rotations, you have to save and re-run the tool with the saved output as the new input.
The four rotations, mapped out
Most people only ever need 90° clockwise. The others come up rarely, but when they do, the choice is unambiguous if you know what to look for.
| Angle | What it does to the page | When you need it |
|---|---|---|
| 0° (no rotation) | Leaves the page as-is | The page is already correct; you do not need this tool |
| 90° clockwise | What was on top moves to the right edge | Sideways scan, text reading bottom-to-top from the left side of the page |
| 180° | Flips upside-down | Page was fed face-down through a scanner, or generated by a buggy app that inverted Y-axis |
| 270° clockwise | What was on top moves to the left edge — equivalent to 90° counter-clockwise | Sideways scan, text reading top-to-bottom from the right side of the page |
Worked example: you scanned a 12-page contract with the document feeder set to portrait but the original pages were landscape. Every page in the resulting PDF appears rotated 90° to the right — the text reads bottom-to-top from the left edge of each page. You want to read it normally, with the title at the top. Open the PDF in the Rotate PDF tool, pick 270° clockwise (because the current top is on the left and you want it back on the actual top), click Rotate, download. The file size of the output will be within a few hundred bytes of the input — the rotation metadata flag changed, nothing else.
Why this beats the upload-and-watermark crowd
Search "rotate PDF online" and the first ten results are some combination of iLovePDF, SmallPDF, PDF24, Sejda, and Convertio. Every one of them does the same thing under the hood (pdf-lib or a similar library can rotate a PDF in three lines of code). The difference is what they wrap around it: an upload to a server you do not own, a 5 MB cap on the free tier, a watermark on the output unless you sign up, a "you've reached your daily limit" timer that resets in 23 hours.
This is busywork dressed up as a service. Rotating a PDF is a metadata change that takes 80 milliseconds on a phone. There is no reason it should require a round trip to a server in another country and an account creation flow. The Rotate PDF tool does the rotation in your browser using the same pdf-lib library those competitors use on their servers. Your file does not upload. There is no watermark. There is no daily limit. There is no signup. Free is a fact, not a slogan.
The honest tradeoff: because the work happens in your browser, very large PDFs (multi-hundred MB) can hit memory limits on a phone or an older laptop. The cap is 100 MB. For files larger than that, work on a desktop or split the document first using the Split PDF tool. The competitors do not have this limit on their paid tiers because they have more RAM than your laptop. They charge you for that RAM.
What gets preserved
Because the rotation is a metadata change and not a re-render, every other property of the PDF passes through untouched:
- Text remains selectable and searchable. The text layer is unchanged; the rotation flag just tells the reader to display it sideways. Ctrl-F still works.
- Bookmarks and links remain clickable. Internal references (page jumps) and external hyperlinks pass through as-is.
- Form fields remain fillable. If you had a form with values filled in, the values stay. You can still type into empty fields after rotating.
- Signatures stay valid. Drawn-signature images and even digital signatures pass through because the underlying page content is unchanged. Compare with the Flatten PDF Form tool, which deliberately invalidates digital signatures because it converts fields to drawn pixels.
- File size barely moves. The output is within a few hundred bytes of the input. There is no re-encoding because there is nothing to re-encode.
Edge cases
A few situations where Rotate PDF will not do what you want, and what to use instead:
- You only want to rotate one page, not all of them. The current tool applies the same rotation to every page in the PDF. Per-page rotation with thumbnail previews is on the roadmap. Today's workaround: Split PDF to extract the single page, rotate it here, then PDF Merger to put it back. Three operations, all client-side, all free.
- The PDF is password-protected. pdf-lib refuses to open encrypted PDFs — there is no key, so there is no way to read the bytes. Remove the password first using a desktop reader's "save as unprotected copy" feature.
- The PDF is a scan that's slightly tilted (5° off, not 90°). This tool does not deskew. PDFs only support rotation in 90° increments because the spec does. For deskewing a slightly crooked scan, you need an OCR-grade tool that rasterizes, rotates the pixels by an arbitrary angle, and re-saves — not what this tool does.
- The rotation already looks correct in one reader but wrong in another. Sometimes a PDF has a rotation flag that one reader respects and another ignores. Running Rotate PDF with the angle you actually want forces every reader to display the same orientation.
Related tools
Most PDF orientation problems do not show up alone. They show up alongside other PDF housekeeping:
- Split PDF — extract specific pages from a larger PDF. Useful when only some pages need rotating.
- PDF Merger — combine several PDFs (or split-out pages) back into a single file.
- Crop PDF — trim the white margins after rotating, especially helpful for scans that came out with extra space on what is now the top and bottom.
- Compress PDF — shrink the output file if the original scan was huge and you want to email it.
- PDF Page Numbers — add page numbers after rotation, since some scans come in without them.
Frequently asked questions
Is my PDF really not uploaded?
Correct. The rotation runs entirely in your browser using the pdf-lib JavaScript library. The bytes of your PDF travel from your file system to your browser's memory to the output PDF — they never reach a server. Open your browser's network tab during the rotate operation and you will see zero outbound requests. The Microapp page itself was served by our CDN, but everything after that page load happens locally on your machine.
What is the difference between 90° clockwise and 270°?
They rotate in opposite directions. 90° clockwise moves the top of the page to the right side. 270° clockwise (which equals 90° counter-clockwise) moves the top of the page to the left side. If your scan is sideways with the text reading bottom-to-top from the left edge, you want 270°. If text reads top-to-bottom from the right edge, you want 90°. There is no penalty for guessing wrong — undo and try the other one.
Can I rotate just one page instead of the whole document?
Not in the current version. The tool applies the same rotation angle to every page. Per-page rotation with thumbnail previews is on the roadmap. As a workaround today, use Split PDF to extract the page that needs rotating, run it through Rotate PDF, then use PDF Merger to put the rotated page back into the original document.
Will this re-encode the PDF or hurt quality?
No. PDF rotation is a metadata change — the underlying page content (text, images, vectors) is completely untouched. pdf-lib just updates each page's rotation property. The output file is essentially the same size as the input, and there is no quality loss whatsoever. The rotation is honored by every standards-compliant PDF reader.
My PDF was already rotated 90°. What happens if I rotate it 90° again?
The tool uses setRotation, which replaces the existing rotation rather than adding to it. A page that was already at 90° and is then rotated 90° again is still at 90°, not at 180°. If you want to stack rotations, the simplest path is to rotate once, save the file, re-open the saved file in the tool, and rotate again.
What is the maximum file size?
100 MB per PDF. The tool reads the file into your browser's memory to apply the rotation, so very large PDFs can hit memory limits on phones or older laptops. For multi-hundred-MB PDFs, work on a desktop or split the document into chunks first using Split PDF.
Does it preserve bookmarks, links, and form fields?
Yes. Rotation in pdf-lib only updates each page's rotation metadata — bookmarks, hyperlinks, annotations, form fields, and outlines all pass through untouched. Form field values stay filled in. Signatures (both drawn-image and digital) remain valid because the underlying content is unchanged.
What about password-protected PDFs?
Encrypted PDFs will not open — pdf-lib refuses to load them because there is no decryption key. Remove the password first using a desktop PDF reader's "save as unprotected copy" feature, then run Rotate PDF on the resulting file.