Perspective Correction - Straighten Photos and Documents

Drag four markers onto the corners of whatever should be rectangular, and a homography transform pulls it back to a true rectangle. Fixes leaning buildings and flattens photographed documents. Computed in your browser.

Works on buildings, whiteboards, paintings and photographed paperwork.

Keystoning, and how a four-point warp fixes it

Point a camera up at a building and the vertical lines lean inwards. Photograph a document flat on a desk from a seated position and the far edge comes out narrower than the near one. Both are the same effect, called keystoning: a rectangle in the real world lands on the sensor as a trapezoid because the film plane is not parallel to the subject.

The correction is a perspective transform, or homography. You tell the tool where the four corners of the rectangle currently sit by dragging the markers onto them, and it computes the mapping that pulls those four points back into a true rectangle, taking every other pixel along with them. It is the same maths a document scanner app runs when it snaps a photographed page flat, and the same one a tilt-shift lens achieves optically.

The accuracy of the result comes entirely from where you place the markers, so it pays to zoom in mentally on the actual corner rather than approximating. For architecture, put them on the corners of the facade. For a document, put them on the corners of the paper, not the text block. For a whiteboard or a painting, use the frame. Once the four points are right, the correction is exact rather than an approximation.

Everything is computed in your browser, which is worth having for the document case in particular: receipts, contracts, ID scans and signed paperwork get straightened without a copy of them landing on anyone's server.

How to straighten a photo

  1. Upload the image. A building, a photographed document, a whiteboard or anything else that should be rectangular.
  2. Drag the four markers onto the corners. Take your time here, the accuracy of the whole correction depends on these four points.
  3. Click Straighten Perspective. The transform is applied and the corrected version appears.
  4. Download, or start over. If the result looks off, Start Over lets you reposition the markers and try again.

A tip for documents: crop tightly to the page afterwards with the image cropper, then run it through filters and raise the contrast to make the text crisper. If the photo is simply rotated a quarter turn rather than tilted, the rotate and flip tool is quicker.

Features

True homography

A real four-point perspective transform, not a rotation or a stretch, so straight lines stay straight after correction.

Nothing uploaded

Contracts, receipts and ID scans are straightened entirely on your device, with no account and no tracking.

Drag-to-place corners

You set the four points by eye on the live preview, so the correction matches the actual subject rather than a guess.

Frequently asked questions

What is keystone correction?

It is the fix for a rectangle that photographed as a trapezoid, which happens whenever the camera is not parallel to the subject. Shooting a building from ground level or a document from a seated angle both produce it.

Where exactly should I place the four markers?

On the corners of the thing that should be rectangular: the corners of the facade for architecture, of the paper for a document, of the frame for a whiteboard or painting. The correction is exact when those four points are.

Can I use it to flatten photographed documents?

Yes, that is one of the most common uses. Put the markers on the page corners and the page comes back square, the same operation a scanner app performs.

Is this the same as rotating the image?

No. Rotation turns the whole picture by an angle. A perspective transform changes the shape of the frame, pulling converging lines back to parallel, which rotation cannot do.

Are my files uploaded?

No. The transform is computed in your browser, so sensitive paperwork never leaves your device.

🔎 Verify it yourself: nothing uploads

Don’t take our word for it. Open your browser’s DevTools (F12Network tab), then run this tool on any image. You’ll see no upload request at all — your file never leaves this tab. You can even turn off Wi‑Fi once the page has loaded and keep working. Every tool on this site works the same way — all processing happens on your device.