Document Photo Scanner (Fix Skewed Phone Photos of Papers, Remove Shadows to White, Combine into a PDF)
Completely free, with no extra charges. You may freely use the output commercially.
About this tool
When you photograph a document on a desk with your phone, the page almost always comes out at an angle, and the shadow of your hand or the room lighting turns the paper a dull grey. This tool finds the four corners of the paper in such a photo, straightens it into a rectangle as if shot from directly above (perspective correction / keystone correction), and evens out shadows and yellowed paper to white, so the result looks like it came out of a scanner. Load several photos at once to reorder the pages and save them as a single PDF.
Use it without a scanner or a scanning app to send a copy of a signed contract or application form, submit receipts for an expense claim, keep a whiteboard or a handout, or save your child’s school worksheets. Choose a finish from “Color (white background)”, “Grayscale”, “Black & white (crisp text)” and “No enhancement”, and match the aspect ratio of A4, Letter, business cards or ID cards. All processing happens entirely in your browser (no data is sent).
Load photos of documents
Drop photos here or paste with Ctrl+V (⌘+V). If you select several, they become pages in the order selected.
Match the four corners of the paper
Result and saving
How to use
- Place the document on a desk or similar and take a photo with all four corners of the paper in the frame. Load it with “Choose photos”, or on a phone use “Take a photo” to shoot it on the spot. To try the tool first, press “Try a sample photo”.
- Under “Match the four corners of the paper”, the detected area is shown with green lines. If a corner is off, drag the round handle onto the corner of the page. While dragging, the area around the corner is magnified.
- Choose a finish under “Result and saving”. Color suits contracts and application forms, black & white suits text-only documents. For a standard paper size, set “Paper aspect ratio” so the text is not stretched horizontally or vertically.
- For several pages, select each page in the list above and match its corners the same way, use “Earlier” and “Later” to put them in order, then press “Save as PDF (all pages)”.
How to shoot for a clean correction
The tool finds the corners by relying on the paper being brighter than the background. White paper is easiest to detect on a wooden desk or a dark table. On a white desk or a white sheet the edge of the paper cannot be told apart, and you will have to place the corners by hand.
- Keep all four corners inside the frame If a corner sticks out of the frame, that part becomes stretched background after correction.
- Shoot from close to straight above Perspective correction fixes the shape, but the steeper the angle, the fewer pixels the far side of the text gets, and it turns blurry after correction. A slight angle is no problem.
- Don’t worry too much about shadows Shadows of your hand or phone and uneven lighting mostly turn white, because the tool estimates the paper brightness in each area and divides it out. Text washed out by strong glare (shine on glossy paper) cannot be recovered, so avoid shooting directly under a light.
- Folds and curls are not fixed The correction assumes the paper is a flat rectangle. If the paper is curved, as with an open notebook, the lines near the middle stay curved.
Choosing a finish
- Color (remove shadows, white background) When you want to keep red seal stamps, pen colors, photos or logos. Yellowing and colour casts from shadows are removed too.
- Grayscale When you don’t need color but want to keep faint pencil notes or the tones of photos.
- Black & white (crisp text) For text-only documents and receipts. The files are the smallest and look like a fax or photocopy. If faint text disappears, move the “text weight” slider to the right.
- No enhancement Fixes the shape only and keeps the colors as the camera captured them. For flyers with pictures or photos whose colors you don’t want changed.
How the correction works
To find the corners, the tool shrinks the photo and splits it into “paper” and “background” by brightness (binarization with Otsu’s method), fills the holes left by text in the largest bright region, and then picks the quadrilateral with the largest area within the convex hull around its outline. In case a shadow darkens half of the page, it also compares several candidates made with different thresholds.
For the shape, it computes the perspective transform (homography) matrix from the four corners, works backwards to find where each pixel of the corrected image falls in the original photo, and sets its color by interpolating the four surrounding pixels. To whiten the background, it divides the page into small blocks, treats the brightest part of each block as the paper color, joins them smoothly into a “paper brightness map”, and divides each pixel by it to cancel out shadows and uneven lighting.
About the saved files
Saved images and PDFs are built fresh from the corrected pixels, so they contain none of the original photo’s Exif data (date taken, camera model, GPS location). The PDF consists of embedded images, so its text cannot be searched or copied (no text recognition is performed). For A4 at “Standard” quality, expect roughly 0.3–1 MB per page, or 0.1–0.3 MB in black & white.
To add a watermark stating the purpose before submitting an image of an ID document, use ID Document Watermark. To simply put photos that are already cropped into a PDF, use Images to PDF, and to number the pages of the finished PDF, use Add Page Numbers to a PDF.