Fix a sideways or upside-down PDF in seconds
Upload your PDF, choose how far to rotate — 90°, 180°, or 270° — and download the corrected file. No sign-up, no software to install, and your file never leaves your device.
This is the fastest way to straighten a scanned document, flip a landscape-orientation page to portrait, or permanently fix the rotation before sharing with a client or colleague.
How to rotate a PDF
- Add your file — click the upload area or drag your PDF straight onto it.
- Pick the rotation — choose 90° clockwise, 180° (flip upside-down), or 270° (same as 90° counter-clockwise). Most scanned documents need 90° or 270°.
- Choose which pages — rotate all pages at once, or select specific page numbers (for example, just page 3).
- Click Rotate — the tool processes your file instantly in your browser.
- Download your PDF — the corrected file saves straight to your computer.
Your PDF is processed entirely in your browser using JavaScript. It is never uploaded to a server — unlike most online PDF tools. That makes it safe for confidential documents like contracts, medical forms, or financial statements.
Worked example
Imagine you scanned a one-page receipt and it opened sideways (landscape instead of portrait). Here is what happens step by step:
- Input:
receipt_scan.pdf— a single page, currently rotated 90° too far to the right, so the text reads sideways. - Setting: Rotate 90° counter-clockwise (select 270° in the tool).
- Output:
receipt_scan_rotated.pdf— same file, same content, but now the text reads normally upright.
The file size barely changes because only the page orientation metadata is updated — the actual content stays identical.
How to rotate a PDF in Python or JavaScript
If you need to rotate pages in code rather than a browser, here are the most common approaches.
Python (using PyPDF2)
import PyPDF2
with open('input.pdf', 'rb') as f:
reader = PyPDF2.PdfReader(f)
writer = PyPDF2.PdfWriter()
for page in reader.pages:
page.rotate(90) # rotate 90 degrees clockwise
writer.add_page(page)
with open('output.pdf', 'wb') as f:
writer.write(f)
Install with pip install pypdf2. Replace 90 with 180 or 270 as needed. This runs locally — no upload required.
JavaScript (using pdf-lib in Node.js)
import { PDFDocument, degrees } from 'pdf-lib';
import { readFileSync, writeFileSync } from 'fs';
const pdfBytes = readFileSync('input.pdf');
const pdfDoc = await PDFDocument.load(pdfBytes);
for (const page of pdfDoc.getPages()) {
page.setRotation(degrees(90)); // rotate 90 degrees clockwise
}
const rotatedPdf = await pdfDoc.save();
writeFileSync('output.pdf', rotatedPdf);
Install with npm install pdf-lib. This works in both Node.js and the browser. The pdf-lib official docs cover more page manipulation options.
How it works under the hood
PDFs store each page's rotation as a number in its metadata (the /Rotate entry in the page dictionary, per the PDF specification (ISO 32000)). Rotating a page just updates that number — 0, 90, 180, or 270 — without touching the actual text or image data.
Because only a small metadata value changes, the output file is nearly identical in size to the original. The browser-based tool reads your PDF with JavaScript, updates the rotation entry, and hands the modified file back to you — entirely on your machine.
When to use this tool (and when not to)
| Situation | Use this tool? |
|---|---|
| Scanned page is sideways or upside-down | ✅ Yes — perfect use case |
| Need to flip one page in a multi-page PDF | ✅ Yes — select just that page number |
| Want to permanently fix rotation before emailing | ✅ Yes — viewers won't auto-rotate it |
| Need to rotate an image before converting to PDF | ⚠️ Rotate the image first, then convert |
| PDF is password-protected (encrypted) | ❌ Remove the password first |
| Need to rotate content (text reflow), not just the view | ❌ That requires editing software like Adobe Acrobat |
Related tools you might need
Working with other file formats on the same project? These tools are quick and also run entirely in your browser:
- Need to clean up data alongside your PDF workflow? The JSON Beautifier formats messy JSON into readable, indented text instantly.
- Sending JSON data in a compressed payload? The JSON Minifier strips whitespace and shrinks file size without changing the data.
- Got a JSON error you can't track down? The JSON Validator pinpoints exactly which line is broken.
Bottom line: if your PDF is sideways, this tool fixes it in under 30 seconds — no account, no upload, no fuss. Drop your file above and get your corrected PDF right now.