PDF Tools

All tools, free, in your browser.

VoxScan› PDF Tools› View & Edit› Deskew Scanned PDF

Straighten a Skewed Scanned PDF

Straighten pages that went through the scanner at an angle. The tool measures the tilt of the text lines on each page, shows the detected angle, and rotates every page back — automatically, or by hand in tenth-of-a-degree steps. Live preview, nothing uploaded.

Auto angle detectionPer-page correctionManual overrideLive preview
All Tools › ›

How to straighten a skewed scanned PDF

Upload the PDF and the tool measures the tilt of the text on the preview page, reports it — "Detected skew: −2.3°", for example — and shows the page rotated back by that amount. With Detect angle automatically ticked, every page in the file is measured and corrected individually when you click Process, so a stack of pages that went through a feeder at slightly different angles all come out straight. If the detection is wrong on an unusual page, drag the Rotation slider to set the angle by hand in steps of a tenth of a degree; the preview updates as you drag. The page size does not change, and the corners that rotation uncovers are filled with white. Rendering, detection and rotation all run in your browser; nothing is uploaded.

Step by step

  1. Drop the crooked PDF onto the upload area.
  2. Read the detected angle under the slider and check the preview: text lines should now be parallel to the top edge.
  3. If a page is a photo or a drawing without text lines, the tool says so; untick auto-detect and set the angle by eye.
  4. Click Process. Each page is measured and rotated separately when auto-detect is on; otherwise your manual angle is applied to all pages.
  5. Download the straightened PDF. Run it through OCR next if you need searchable text.

How the tilt is detected

The method is a projection profile, the same idea most OCR engines use as a first step. The page is reduced to a few hundred pixels wide, and every pixel darker than the page average by a margin is treated as ink. For each candidate angle between −15° and +15°, the ink pixels are rotated by that angle and projected onto the vertical axis, producing a histogram of how much ink falls on each row. When the lines of text are exactly horizontal, that histogram is spiky — full rows alternating with empty rows between lines. When the page is tilted, ink from each line smears across many rows and the histogram flattens out. The tool scores every angle by the variance of its histogram, tries half-degree steps first and then tenth-degree steps around the best one, and picks the spikiest. A page with fewer than a couple of hundred ink pixels, or with ink covering more than half of the page, is reported as "no text lines detected" rather than guessed.

What deskew fixes, and what it does not

Deskew corrects small rotations — the page fed into a scanner at an angle, the phone held slightly askew, the book that was not pressed flat. It is the right tool for anything up to about 15 degrees. It is not the tool for a page scanned sideways or upside down; those are 90° and 180° turns, and the rotate tool handles them exactly without any resampling. Nor does it correct perspective — a photo taken from an angle, where the page is a trapezoid rather than a tilted rectangle — because that needs a four-corner transform, which the VoxScan scanner app performs automatically at capture time. Tables and forms detect well because their rules behave like text lines; handwriting is measurable but noisier, so check the preview; pages that are mostly a photograph should be set by hand.

Why straight pages matter beyond looks

Text recognition works by finding lines, then words, then characters. A tilt of even two or three degrees makes lines overlap in the projection, so the OCR engine splits and merges them wrongly, and recognition accuracy drops long before the page looks obviously crooked to a person. Printing a tilted scan wastes margin on one side and clips the other. Side-by-side comparison, page-number stamping and watermarking all assume the content is aligned with the page. Straightening is therefore the first fix in a clean-up sequence: deskew, then lighting (remove shadows or brighten a dark scan), then contrast, then OCR.

Manual angle: reading the preview

Positive values rotate the page clockwise, negative values anticlockwise. Find a long line of text or a table rule near the middle of the page and compare it with the top edge of the preview; if the right end sits lower than the left, the page needs a small anticlockwise turn, so decrease the angle. Half a degree is clearly visible on a full page; a tenth of a degree is at the limit of what a reader notices. Because the page is rotated about its centre, content near the corners moves the most — check that nothing important has been pushed off the edge on pages with narrow margins.

Scanning straight next time

On a flatbed, push the sheet into the corner guides rather than centring it by eye. With a document feeder, fan the stack and square it against the table before loading. On a phone, use a scanning app instead of the camera: the VoxScan scanner app finds the page corners and straightens both rotation and perspective before it saves the PDF, so there is nothing left to correct.

Frequently asked questions

Is every page measured separately?

Yes, when auto-detect is on. Feeder scans often have a slightly different tilt on every sheet, and each page gets its own correction.

Does rotating lose quality?

Each page is rendered at twice its nominal resolution before rotation and stored as an image, so text stays sharp. The corners uncovered by the rotation are filled with white.

It detected the wrong angle on one page.

Pages dominated by a picture, a large logo or handwriting can mislead the projection. Untick auto-detect, set the angle by hand for that page, and process it separately, or split the document first.

Can it fix a page that is sideways?

No — use the rotate tool for 90° and 180° turns. Deskew is for small angles up to 15°.

Does the text stay selectable?

The output pages are images. Run the result through the OCR tool to add a searchable, selectable text layer; recognition is more accurate on the straightened pages.

Is my file uploaded?

No. The PDF never leaves your browser; detection and rotation run locally in JavaScript.