Home › Image Tools › Perspective Correction

Perspective Correction

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

  1. Open a photo: drop it on the box, paste it or press Choose image. A sample photo of a tilted sign is loaded first.
  2. 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.
  3. 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.
  4. Pick the output: Crop to selection keeps only the corrected rectangle, Keep whole image straightens the entire photo. Set the output width.
  5. 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:

x′ = (h₁₁x + h₁₂y + h₁₃) ÷ (h₃₁x + h₃₂y + 1), y′ = (h₂₁x + h₂₂y + h₂₃) ÷ (h₃₁x + h₃₂y + 1)

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

SubjectShapeOutput
TV, monitor, presentation slide16 : 9Crop to selection
Sheet of paper, poster, menuA4 or US LetterCrop to selection
Whiteboard, sign, paintingAuto, or Custom with the real size in cm or inchesCrop to selection
Building facade, room interiorAuto or Edge lengthsKeep whole image
Floor tiles, board games, book pages1 : 1 or the known ratioCrop 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.

Related tools

Online Document ScannerTurn photos of paper into clean scans: auto edge detection, perspective fix, multi-page PDF.Image CropperCrop images, including circle crops for profile pictures.Rotate & Flip ImageRotate images by any angle or mirror them, one or many at once.Image ResizerResize images to any size without losing quality.Whiteboard Photo to PDFClean up whiteboard and blackboard photos: straighten, remove glare, whiten, then save as PDF.Background RemoverRemove image backgrounds automatically with AI.Photo EnhancerOne-click auto enhance: fix exposure, contrast, color cast and sharpness, one photo or a batch.Remove Object from PhotoBrush over unwanted objects, people or text and fill the area with matching background.Make Image TransparentRemove a white or solid-color background and save a transparent PNG, right in your browser.Photo to CartoonTurn photos into cartoons with smooth colors and bold outlines. Free, private, no upload.Add Watermark to PhotoAdd a text or logo watermark to one or many photos at once.Blur Image & Face Pixelate ToolBlur or pixelate faces, plates and backgrounds in a photo.Pixelate Image & Pixel Art ConverterTurn any picture into pixel art with retro palettes and dithering.Add Text to ImageAdd styled text layers with outline and shadow to any photo, then downloadRound Corners ImageGive any picture rounded, circle or squircle corners and save a transparent PNG.Grayscale Image ConverterTurn color photos into black and white with luma, luminance or average methods and sepia.Photo FiltersApply 27 one-click photo filters like Vintage, Noir and Teal & Orange with an intensity slider.Photo EditorEdit photos online: brightness, contrast, saturation, crop, rotate, flip and filters with undo.Image SharpenerSharpen soft or slightly blurry photos with a real unsharp mask and before/after view.Invert Image ColorsTurn any picture into a color negative, with R/G/B channel toggles and an intensity slider.Screenshot BeautifierPut screenshots on gradient backgrounds with padding, rounded corners, shadow and a browser frame.Image Metadata ViewerSee a photo's EXIF data: camera, lens, exposure, date and GPS location, then strip it in one click.EXIF RemoverRemove EXIF, GPS location and other metadata from JPG, PNG and WEBP photos.Online PaintDraw and paint in your browser: brushes, shapes, fill bucket, text, undo and PNG export.Photo to SketchTurn any photo into a pencil, charcoal or color sketch in your browser and download it.GIF Frame ExtractorSplit an animated GIF into PNG frames with delays, a sprite sheet and ZIP download.Photo Frame MakerPut photos in polaroid, film strip, gallery, rounded or shadow frames with a caption.Duotone GeneratorTurn any photo into a bold two-color duotone image with presets, custom colors and intensity.Glitch Image EffectAdd RGB split, scanlines, slice shifts and noise to a photo for a digital glitch look.Add Date Stamp to PhotoStamp the EXIF or a custom date on photos in a retro orange camera font. Batch and ZIP download.Add Drop Shadow to ImageAdd a drop, long or reflection shadow to PNGs and photos and save a transparent PNG.Add Text to GIFPut captions on animated GIFs with outline, position and frame range, then download.Blend Two ImagesOverlay two photos with opacity, 16 blend modes, fades and free positioning, then download.Blur Photo BackgroundBlur the background of any photo for a portrait-mode look. AI subject detection, no upload.Brick Mosaic GeneratorTurn a photo into a toy-brick stud mosaic with a parts list and printable build guide PDF.Add Film Grain to PhotoAdd realistic analog film grain, light leaks, fade and vignette to any photo, then download.GIF Speed ChangerSpeed up or slow down an animated GIF, or set each frame's delay, without losing quality.Halftone GeneratorTurn images into mono or CMYK halftone dots and lines; export PNG or SVG.Image Opacity ChangerMake an image semi-transparent with an opacity slider or fade, and save a transparent PNG.Photo to WatercolorTurn a photo into a watercolor painting with soft washes, color bleed, wet edges and paper texture.Product Photo White BackgroundRemove the background and center products on pure white at 2000 x 2000 for marketplaces. Batch.Redact ImageBlack out or pixelate private info in screenshots; burned in, metadata stripped, PNG download.Rubber Stamp MakerDesign round or rectangular stamps with curved text, borders, stars and grunge ink; PNG or SVG.Signature Background RemoverTurn a signature photo or scan into a clean transparent PNG: threshold, ink color, auto-crop.Skin SmoothingSmooth skin in portraits with face-aware retouching that keeps eyes, lips and skin texture sharp.Straighten ImageFix a tilted photo: rotate by any angle with a grid, auto-crop the corners or level the horizon.AI Style TransferRepaint your photo in the style of any painting or pattern with AI, right in your browser.SVG EditorEdit SVG files visually: move shapes, change colors, text and strokes, add shapes, edit the code.Symmetry Drawing ToolDraw mandalas and kaleidoscope art with radial and mirror symmetry, glow brushes and PNG export.Virtual Background MakerDesign 1920×1080 video call backgrounds with your name, title, logo, blur and branded templates.EXIF EditorEdit photo EXIF and IPTC: date taken, camera, GPS location, copyright and caption, in batch.Face Symmetry TestUpload a face photo to see left-left and right-right mirror composites and a symmetry score.Sports Tactics BoardDraw plays on basketball, soccer, football and hockey diagrams with players, arrows and animated frames.Add Outline to PNGAdd a stroke outline around transparent PNG cutouts: width, color, softness and double borders.Dehaze ImageRemove haze, fog and smog from photos with the dark channel prior. Free, private, in your browser.HDR Photo EffectGive any single photo an HDR look with local tone mapping, detail boost and a strength slider.Low Light Photo EnhancerBrighten dark and night photos with an adaptive tone curve plus noise reduction.Photo StackingStack photos online: star trails (lighten), noise reduction (mean) and remove passers-by (median).Image Noise RemoverRemove grain and color noise from photos with median, bilateral or non-local means filters.Image Dithering ToolDither photos with Floyd-Steinberg, Atkinson or Bayer in 1-bit, Game Boy, CGA and retro palettes.Photo Mosaic MakerBuild a big picture out of many small photos by color matching, then export a high-res PNG.Photo to Oil PaintingTurn a photo into an oil painting with brush size, detail, impasto and canvas texture.Red Eye RemoverClick on red eyes to fix them automatically: adjustable threshold, undo, download the photo.Tilt Shift EffectMake photos look like miniature models with an adjustable tilt-shift focus band and blur.Colorize Black and White PhotoAdd natural color to old black and white photos with AI that runs in your browser. No upload.Draw on ImageAnnotate photos and screenshots with arrows, boxes, text, highlighter and numbered steps.Photo to AnimeTurn selfies and landscapes into anime-style art with AI in your browser. Free, no upload.Face Shape DetectorUpload a selfie to find your face shape on-device, with hairstyle and glasses tips.
See all 69 Photo Effects & Editing →