Deskew PDF Scans: How to Straighten a Crooked Page Before You Share or OCR It
Past a degree or so, a tilt can wreck text recognition. Here's how much tilt we could get away with, and how to straighten a page.

To deskew a PDF, you run its scanned pages through a tool that measures how far the lines of text are tilted and turns each page image back by that angle. Online deskew tools, OCRmyPDF and image editors like GIMP all do it.
Deskewing only works on scans, where each page is a picture. A PDF made in Word or exported from a website has straight text already, and a page that's sideways or upside down needs a rotation, not a deskew.
Skewed or Just Rotated? Check This First
A skewed page is tilted by a few degrees, usually because the paper went into the scanner at an angle. A rotated page is turned by a full 90 or 180 degrees: landscape pages lying on their side, or a duplex scan with every second page upside down.
Rotation is the easy fix: Rotate PDF turns whole pages left or right in quarter turns, right in your browser, without uploading the file. It can't straighten a page that's off by 2 degrees, though, and none of our tools deskews a scan. If a page is still sideways after you download it, our guide to a PDF that's still sideways after rotating explains why.

If a page still looks off after you've turned it upright, it's skewed. Only need to fix a couple of pages in a long file? Pull them out first with Extract PDF Pages so you're working on a small file.
Why a Crooked Scan Is Worth Fixing
The look is the obvious part. The bigger problem is text recognition: OCR software reads a page line by line, and tilted lines throw it off.
Tesseract, the open source OCR engine our tool uses, says so in its guide to improving the quality of the output: line detection gets much worse when a page is too skewed.
How Much Tilt Does OCR Tolerate?
On our two test pages, 1 degree cost little and 2 degrees started to hurt. We put the same generated 256-word, 300 dpi page through our OCR PDF page in November 2026 (Chrome on a Mac), turned by each angle in both directions, and counted the correct words:
| Tilt | Turned clockwise | Turned counterclockwise |
|---|---|---|
| 0 degrees | 256 | 256 |
| 0.5 degrees | 256 | 256 |
| 1 degree | 256 | 256 |
| 2 degrees | 127 | 203 |
| 3 degrees | 91 | 202 |
| 5 degrees | Refused | 161 |
| 10 degrees | Refused | Refused |
"Refused" means the tool found no readable text and gave back no file. A second generated page, 133 words on gray paper and turned one way, did worse: 130 words at 1 degree, refused at 2, 63 at 5 and refused at 10. The results jump around from page to page, so treat them as a rough guide.
On the 256-word page, a tilt under a degree cost nothing. From 2 degrees on, deskew first if you plan to search or copy the text.
Deskew a PDF Online for Free
Several online PDF services have a dedicated deskew tool. You upload the scan, the service detects the angle on each page and you download a straightened copy. Sejda, for example, lists Deskew under its Scans tools next to OCR.

Before you upload, check the free plan's page and size limits and how long the service keeps your file. For contracts, medical records or anything else confidential, a tool that runs on your own computer is the safer bet.
If you already have Adobe Acrobat, this video walks through deskewing a page there:
Deskew PDF Pages for Free on Your Own Computer
These run offline. OCRmyPDF can work through file after file in a script once it's set up, and GIMP suits a single page.
OCRmyPDF on Windows, Mac and Linux
OCRmyPDF is a free command line tool that adds a text layer to scans. On a Mac, install it with brew install ocrmypdf. On Debian or Ubuntu it's apt install ocrmypdf, though its docs say those packages may lag by several major versions.
On Windows, its docs have you run winget install -e --id tesseract-ocr.tesseract and winget install -e --id astral-sh.uv, install Ghostscript by hand, then run uv tool install ocrmypdf.
Its --deskew option straightens each page before the OCR runs, so you get a straight and searchable PDF in one go.
1ocrmypdf --deskew scan.pdf scan-straight.pdfIf the scan already holds a text layer, its documentation says it exits with code 6 and leaves the PDF unchanged. Its --redo-ocr mode can't be combined with image options like this one.
Use --force-ocr to redo the whole page as an image. If you only want the straightening and no new text layer, its cookbook gives --tesseract-timeout 0.
ImageMagick for Page Images
ImageMagick has a -deskew option that straightens an image; its documentation says a threshold of 40% works for most images, and -set option:deskew:auto-crop true crops the result. Its download page gives brew install imagemagick for a Mac and apt install imagemagick for Linux, and has Windows installers. Turn the PDF into images with PDF to JPG, straighten them, then put them back together.
GIMP for Pages That Need a Hand
For a single badly bent page, an image editor gives you full control. Open the page image in GIMP, use the Measure tool along a line of text and click Straighten, then export it as a JPG.
Once every page is fixed, combine the images in order with JPG to PDF.
After You Deskew: OCR, Size and Sharing
Once the pages are straight, run OCR. Our OCR PDF tool reads English text and lays it over each page as an invisible layer, so the PDF becomes searchable.

If the straightened file has grown, shrink it with Compress PDF before you email it. Printing a stack of straightened scans? Our guide to printing multiple PDF files at once shows how to keep them in order.
How to Avoid Skewed Scans Next Time
Our guide to how to straighten scanned PDF pages at the scanner has more on this, including when a rescan beats a deskew.
- Push the paper into the corner guides of a flatbed scanner.
- On a sheet feeder, slide the side guides in until they touch the stack.
- With a phone, lay the page on a flat, dark surface and hold the phone straight above it.
- Scan at 300 dpi, the resolution Tesseract recommends for OCR.
Frequently Asked Questions about Deskew PDF
What does it mean to deskew a PDF?
Deskewing finds the angle of the text lines on a scanned page and turns the page image back so the lines run level. It only changes scanned pages, not text that was typed into the PDF.
Why does my PDF still look crooked after deskewing?
Deskew tools fix a page that's tilted as a whole. A page that curves near a book's spine or was photographed at an angle is warped, not tilted, and needs manual work in an image editor or a rescan.
Can I deskew several PDFs at once?
Yes. OCRmyPDF can work through a folder when a script calls it on each file.
Does deskewing lower the quality of my scan?
Turning a page image means the pixels get redrawn, so very fine detail can soften a little. Keep the original scan, and work on a copy.
Can pdf-file.com straighten a crooked scan?
No. Rotate PDF turns pages in steps of 90 degrees and OCR PDF keeps each page at the angle it was scanned. Deskew with one of the tools above, then use ours for OCR, compression or page edits.


