Deskew PDF

Automatically straighten tilted scanned pages using OpenCV.

Click to select files or drag and drop

One or more PDF files

Your files never leave your device.

What Is Deskewing?

Deskewing means measuring how far a scanned page is rotated away from vertical, then rotating it back. When a sheet is fed into a scanner slightly crooked, or a page is photographed by hand, every line of text ends up sitting at the same small angle. A tilt of one or two degrees is almost invisible on screen, but it makes text harder to read, wrecks OCR accuracy, and produces uneven margins the moment you print or bind the document.

This tool renders each page, measures the dominant angle of the text on it, and rotates the page by the negative of that angle. Pages that are already straight are detected and left untouched, so a folder of mixed scans comes out uniformly aligned without you checking any of them by hand.

Compressing a skewed scan makes things worse, not better, because lossy compression spends bits describing the tilt. Straighten first, then compress - the same document compresses noticeably smaller when the text runs horizontally.

Why straighten a scanned PDF?

  • Better OCR results: recognition engines assume horizontal baselines, and a tilted page costs you real words
  • Easier reading: straight text stays legible on small screens and when the page is zoomed out
  • Consistent printing: aligned pages keep even margins when duplex printing or binding
  • Cleaner archives: a uniform scan set is quicker to review, index and hand over
  • Predictable redaction: redaction boxes and page-geometry tools behave correctly on aligned pages

Key Features

  • ✓ Automatic angle detection
  • ✓ Per-page results list
  • ✓ Threshold control
  • ✓ 100-300 DPI output
  • ✓ Batch input
  • ✓ Never uploaded

How to Deskew a PDF

1

Upload your scan

Drop one or more scanned PDFs onto the upload area, or click to browse. The files are read locally and never sent anywhere.

2

Set sensitivity and quality

Choose a skew threshold so pages that are already straight get skipped, and pick a processing DPI. 150 DPI is a good default; use 300 DPI for small print.

3

Download the aligned PDF

The results panel reports each page's detected angle, then the corrected document downloads. Every page is written at the DPI you selected.

Choosing the Right Settings

Settings by document type

  • Clean office scans: 0.5° threshold at 150 DPI
  • Small print (invoices, contracts): 0.3°-0.5° at 200-300 DPI
  • Photos taken by hand: 1.0° threshold at 200 DPI
  • Batches that are already straight: 1.0°-2.0° so nothing is touched
  • Preparing pages for OCR: 0.1° threshold first, then run OCR

Worth knowing before you start

  • Output pages are images - the original text layer is not preserved
  • Higher DPI means better detection but larger output files
  • Keep the original until you have checked the result
  • Photos of pages work best when lighting is even and the page fills the frame

Frequently Asked Questions

Each page is rendered at the DPI you choose and the image is analysed to find the dominant angle of the text. The detected angle is what the results panel reports for that page, and the page is then rotated by the negative of it. Pages whose angle is smaller than your threshold are reported but left alone.
It is a minimum angle below which nothing happens. The default of 0.5° corrects visible tilt without touching pages that are already straight. Lower it to 0.1° when you want the tightest possible alignment before OCR, or raise it to 1°-2° to correct only clearly crooked pages in a batch that is mostly fine.
No. Every page in the output is written as an image at the processing DPI, so any existing text layer is lost and text can no longer be selected or searched. If you need searchable output, run the straightened file through our OCR PDF tool afterwards - OCR is far more accurate on straight pages anyway.
150 DPI is fast and accurate enough for ordinary letter-sized scans. Use 200 or 300 DPI when the document has small print or fine detail, and 100 DPI when speed matters more than precision. The setting controls the resolution of the output pages as well, so higher values produce larger files.
Pages keep their original dimensions. The rotated image is padded with white in the corners that the rotation exposes, then fitted back onto the page, so content may shrink by a hair but nothing gets pushed off the sheet.
It works best on pages with clear horizontal lines of text. Pages that are mostly photographs, drawings or diagonal design elements give the detector very little to measure, so the reported angle can be unreliable - check the results panel and keep your original for those pages.
After processing, the results panel lists every page with its detected angle and marks the ones that were rotated. Pages under the threshold show their angle but are listed as untouched. When you queue several PDFs, each file downloads under its original name.
No. The page rendering and the angle analysis both run inside your browser through WebAssembly. The processing engine is downloaded the first time you use the tool, but your documents never leave your computer.

Related PDF Tools