Deskew Image
Straighten a crooked scan automatically. Detects the tilt of the text rows, rotates the page level and trims the blank corner triangles.
What is the Deskew Image?
A page fed into a scanner at a slight angle is annoying to read and worse to OCR. This tool measures the tilt for you: it thresholds the scan to black and white, then tries every angle across your chosen range and picks the one where the ink piles up into the sharpest horizontal bands — the angle at which the text rows are level.
- Automatic angle detection by projection-profile variance across every candidate angle
- Otsu thresholding, so it adapts to grey scans and off-white paper on its own
- Search range up to ±30° with a step down to 0.05°
- Manual override for pages where automatic detection has nothing to read
- Trims to the largest inscribed rectangle, or keeps the full frame with a white, black or transparent fill
- Everything runs locally in your browser — the scan is never uploaded
How to use the Deskew Image
- 1
Drop in the crooked scan. The tilt angle is measured immediately and shown as “Detected skew”.
- 2
Adjust the search range and angle step if the tilt is larger or finer than the defaults.
- 3
Choose what happens after rotating: trim to the largest rectangle inside, keep everything with filled corners, or keep the original size.
- 4
If the reading looks wrong, tick “Set the angle myself” and dial the rotation in by eye.
- 5
Check the straightened preview and click Download PNG.
About the Deskew Image
A page fed into a scanner at a slight angle is annoying to read and worse to OCR. This tool measures the tilt for you: it thresholds the scan to black and white, then tries every angle across your chosen range and picks the one where the ink piles up into the sharpest horizontal bands — the angle at which the text rows are level.
Detection is automatic but never forced on you. The detected angle, the ink coverage it measured and the Otsu threshold it used are all shown, and a single checkbox hands the angle over to you if the page is a photo, a table or handwriting where row detection has nothing to lock onto.
After rotating you can trim to the largest rectangle that fits entirely inside the page, keep the whole rotated frame with the corner triangles filled, or hold the original dimensions. All of it happens locally in your browser — the scan is never uploaded.
Frequently asked questions
How does automatic deskew know the angle?
It rotates the ink pixels through every candidate angle and counts how many fall on each row. When the text rows are level the counts alternate between tall spikes on the lines and near-zero between them, which is the angle with the highest profile variance.
Why does it say the skew angle was not found?
The measurement needs rows of dark text on a light background. If the page is almost blank, almost entirely dark, or is a photograph rather than text, there is no row structure to detect and the tool says so instead of guessing. Set the angle yourself in that case.
Does deskewing lose image quality?
A little. Rotating by a non-right angle means every pixel is resampled from its neighbours, which softens fine detail slightly. Choosing hard pixels instead of smooth resampling avoids the softening but leaves stair-stepped edges on the text.
Should I trim the corners or keep the whole page?
Trim to the largest inscribed rectangle when the margins are empty and you want a clean rectangular page — this is the usual choice for documents. Keep everything when content runs right to the edge and cropping would cut it off.
Will this improve OCR accuracy?
Usually yes. Most OCR engines assume text lines run horizontally and lose accuracy as tilt increases, so straightening the page first is one of the cheapest ways to improve recognition on a skewed scan.
Related tools
Image Perspective Correction
Flatten a photo taken at an angle. Drag the four corners of a whiteboard, document or building and get a straight-on rectangle back.
Rotate Image
Rotate images 90 degrees left or right, or enter any custom angle. Free online image rotation tool that processes photos privately in your browser.
Trim Whitespace from Image
Automatically crop white, black, transparent or custom-coloured borders from an image, with a tolerance slider for JPEG edges and optional padding.
Image Cropper
Crop images online to an exact rectangle with pixel-precise x, y, width and height inputs or aspect-ratio presets. Free, private and browser-based.
Reduce Image Noise
Clean grain and speckle out of a photo with a median or edge-preserving bilateral filter, applied to all channels or to colour noise only.