All tools › Optimize › Deskew pages

Deskew pages

Straighten crooked scans. Free, no sign-up.

or drop it here

Deskew pages runs inside your browser — your file never reaches our servers.

How to straighten a crooked scan

Deskewing measures how far each page is tilted and rotates only the ones that need it.

  1. Select your scanned PDF. Pages photographed or fed in at an angle.
  2. Deskew. Each page is measured; straight pages are left completely alone.
  3. Download. You are told how many pages were corrected and by how much.

How the tilt is measured

Every page is rendered to a canvas and sampled on a grid of about 20,000 points, where anything below roughly 43% of full brightness counts as ink. The page is then test-rotated from 8° left to 8° right in quarter-degree steps, and at each angle the ink is projected onto a horizontal histogram of eighty bins. The angle that makes the histogram spikiest — rows of text falling into the same bins, white space between them — is taken as the skew. It is reading lines of text, so a page that is mostly photograph or diagram gives it very little to measure.

Below 0.2° a page is declared straight and the original vector page is copied into the result untouched. That is the whole design: a 200-page scan with four crooked pages comes back with 196 pages nobody has been near. The note under the result gives you how many pages were changed and the largest tilt it measured, which are the two numbers to sanity-check before you keep the file.

What a straightened page costs

A page that does need correcting is rendered at 1.5× its nominal size — about 108 pixels per inch — turned onto a white canvas enlarged to the rotated rectangle so no corner is clipped, encoded as JPEG at 90% quality, and put in place of the vector original. On that page the text is no longer selectable and its links and annotations are gone. The replacement page is also measured in points from the raster's pixel dimensions, so an A4 sheet comes back about half as large again and a partly corrected document ends up with mixed page sizes. Readers scale each page to fit, so it is printing and side-by-side viewing where you notice.

Before OCR PDF that is a good trade: recognition renders every page to about 1100 pixels wide anyway, close to what the deskewed raster already holds, and straight rows are what accuracy actually turns on. If you are keeping the file to read, look at the corrected pages before you keep them. Nothing beyond 8° is considered at all — a page lying a quarter turn round is rotated, not skewed, and that is Rotate PDF. Pages photographed with Scan to PDF are the usual input for both.

Questions

Are my good pages re-rendered too?

No, and this matters. Pages already straight keep their original vector content untouched — text, links and forms survive exactly. Only genuinely tilted pages are re-rendered, so nothing is degraded unnecessarily.

Should I deskew before OCR?

Yes. Straight text is measurably easier to recognise, so deskewing first usually improves OCR accuracy on a crooked scan.

It said every page was already straight. Did it do anything?

It measured every page and found none tilted by 0.2 degrees or more, so it changed none of them — the pages in the file you downloaded are the vector originals, copied across untouched. Born-digital PDFs almost always come back this way.

My page is lying on its side. Will deskew fix it?

No. The search covers only 8 degrees either side of upright, so a page a quarter turn round is not seen as tilted at all. Rotate PDF is the tool for that; deskew is for the small angles a sheet feeder or a hand-held camera introduces.

Why did it straighten a page that looked fine to me?

The measurement follows rows of text, so a page dominated by a photograph, a full-page diagram or a heavily ruled table can produce a false peak. The result reports the largest tilt it measured — if that looks implausible for your document, compare the page against the original before keeping it.

Are my files uploaded to a server?

No. Every tool on this site runs inside your browser, using the same engine as the Folia desktop app. Your file is read from your disk into your browser’s memory, processed there, and handed back as a download. It never crosses the internet, so there is nothing for us to store, leak or hand over.

Is there a file size limit?

We impose none. The only ceiling is your own device’s memory, which differs from one computer to another — so we read what your browser reports about this machine and show the resulting limit on the page. Light tools like merge and rotate handle far more than heavy ones like OCR, which must render every page. For anything larger, Folia for Desktop has no limit at all.

Is it really free? Do I need an account?

Yes, and no. Every tool is free and unlimited, with no watermark and no sign-up. Ads pay for the site, and your own computer does the work, which costs us nothing. Signing in with a paid Folia plan simply removes the ads.

Related tools