Straighten photos taken at an angle. Drag the four corners onto something that should be rectangular, such as a sign, screen, whiteboard, painting or building facade, and the tool warps it into a flat, front-on view. Runs entirely in your browser.
Last updated:
1. Place the corners
Drag the handles onto the corners of something that is rectangular in real life.
2. Corrected result
Output
:
Leave empty for automatic
Advertisement
Advertisement
How to use the Perspective Correction
Open a photo: drop it on the box, paste it or press Choose image. A sample photo of a tilted sign is loaded first.
Drag the four corners onto the corners of a shape that is rectangular in reality. Use the loupe that appears while dragging, or select a handle and nudge it with the arrow keys.
Choose the shape: Auto estimates the real proportions from the perspective; pick 16:9 for a TV, A4 for paper or type an exact width and height.
Pick the output: Crop to selection keeps only the corrected rectangle, Keep whole image straightens the entire photo. Set the output width.
Download the corrected image as PNG, JPG or WebP.
The math behind perspective correction
A camera maps a flat surface onto the photo with a projective transformation. In homogeneous coordinates it is a 3 × 3 matrix H:
It has eight unknowns, and each of your four corners gives two equations, so the four corners define the transform exactly. The tool solves the 8 × 8 linear system with Gaussian elimination, then walks over every pixel of the output rectangle, maps it back into the photo with the inverse transform and blends the four surrounding pixels (bilinear interpolation). Because the division by the third row is kept, straight lines stay straight and the far side is stretched correctly; a simple skew or shear could not do that.
Choosing the right shape
Subject
Shape
Output
TV, monitor, presentation slide
16 : 9
Crop to selection
Sheet of paper, poster, menu
A4 or US Letter
Crop to selection
Whiteboard, sign, painting
Auto, or Custom with the real size in cm or inches
Crop to selection
Building facade, room interior
Auto or Edge lengths
Keep whole image
Floor tiles, board games, book pages
1 : 1 or the known ratio
Crop to selection
Tips for accurate results
Use the loupe: while dragging, a zoomed view shows exactly where the corner sits. Arrow keys move a selected handle by 1 screen pixel, Shift + arrow by 10.
Know the real size? Choose Custom and type the real width and height (any unit). This beats any automatic estimate.
Auto needs an uncropped photo, because it assumes the lens center is in the middle of the image. For crops or screenshots, pick Edge lengths or an exact ratio.
Corners outside the photo: if a corner of the object is cut off, place the handle on the image border along the object's edge, then use Custom shape.
Sharpness: the far side of a steep shot has fewer pixels. The automatic width keeps the near side at its original resolution; a much larger width will not add detail.
Frequently asked questions
What is perspective correction?
When you photograph a flat rectangular object at an angle, its far side looks smaller and its corners no longer form right angles. Perspective correction maps the four corners of that distorted shape back onto a true rectangle, so the object looks as if it had been photographed straight on.
How does the tool calculate the correction?
The four corner pairs define a projective transformation, or homography: a 3 × 3 matrix with eight unknowns solved from eight linear equations. For every pixel of the output the inverse transform finds the matching point in the photo, and the color there is interpolated from the four nearest pixels (bilinear interpolation).
How does Auto know the real proportions?
A rectangle seen in perspective still carries information about its true shape. Assuming the camera's optical center is in the middle of the photo, the tool estimates the focal length from the two vanishing points and derives the real width-to-height ratio. If the photo was cropped or the angle is very slight, choose the exact ratio instead, such as 16:9 for a TV or A4 for paper.
What is the difference between Crop to selection and Keep whole image?
Crop to selection outputs only the rectangle inside your four corners, ideal for signs, screens and documents. Keep whole image applies the same correction to the full photo, which is useful for building facades and architecture shots; the areas outside the original photo stay transparent in PNG or white in JPG.
Why does the result look blurry in some parts?
The far side of the object was captured with fewer pixels, so stretching it to full size cannot add detail. Photograph from a less steep angle or closer to the object for sharper results, and keep the output width close to the size suggested by Auto.
Can I fix vertical lines of buildings (keystone)?
Yes. Place the corners on a rectangle in the facade, such as the outline of a window grid or the building edges, choose Keep whole image, and the converging vertical lines become parallel.
Is my image uploaded?
No. All processing happens in your browser with the Canvas API, so your photos never leave your device.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.