Document Perspective Corrector
Mark the four corners of a photographed page or receipt in clockwise order from the top left. A four-point projective transform maps the slanted paper region into a front-facing rectangle; you can adjust the output size. Compare the color result with grayscale or locally thresholded black-and-white for legibility, then save a PNG and settings JSON. This is not OCR and cannot reconstruct curled paper, shadows or hidden text.
Key features
- Four document corner coordinates and draggable handles
- Four-point projective mapping from a trapezoid to a rectangle with interpolated pixels
- Color, grayscale and local-threshold black-and-white modes with contrast and threshold controls
- Suggested output dimensions from page edge lengths, with manual editing
- Validation of crossed or collapsed quadrilaterals and processing limits
- Straightened PNG and corner/settings JSON without image bytes
How to use
- Load the example or select a photo of a document.
- Align the top-left, top-right, bottom-right and bottom-left handles with the page corners, in that order.
- Check output width and height, then choose color, grayscale or black-and-white and adjust contrast and threshold bias.
- Generate the front-facing image and inspect its crop and text legibility.
- Download the PNG; save the corner JSON too if you plan to reapply settings to the same photo.
Use cases
- Straighten a trapezoidal photo of an A4 page
- Flatten the paper area in a receipt photo
- Correct perspective on photographed handouts or tables and compare grayscale output
Frequently asked questions
In what order should I set the four corners?
Use top-left, top-right, bottom-right and bottom-left as seen in the photo. Crossing edges or a nearly collapsed area cannot be processed.
How is this different from a regular crop?
A crop extracts an axis-aligned rectangle from the photo. This tool projects a slanted four-corner region into a new front-facing rectangle.
Does black-and-white mode recognize or recover text?
No. It thresholds brightness using nearby pixel averages and your chosen bias. It does not invent missing letters or run OCR.
Why might the result look blurry?
The tool cannot add detail absent from the source photo, and interpolation mixes neighboring pixels. Check the selected area and output size, and use a sharp original photo.
Does the settings JSON contain the document photo?
No. JSON stores the four corner coordinates and output settings only. Keep the source photo separately.
Privacy
The photo, corner coordinates and corrected image are processed in your browser. This tool does not send the photo to its server API, and the settings JSON contains no source image bytes.
Comments & questions