About this tool
A photo of a contract, a receipt or a page of lecture notes is rarely usable as it is: the page is a trapezoid, the desk shows around the edges, and your hand or the phone itself casts a grey shadow across the text. This page turns that photo into a scan. Open the camera on your phone (the back camera, with the document outline detected on the live view) or pick photos you already took — many at once. For each one the page finds the four corners, straightens the perspective into a flat rectangle, lifts the shadow so the paper comes out white and the ink black, and adds it as a page. The pages go out as one PDF or as individual JPEGs. Nothing is uploaded: detection, warping and filtering all run in a worker inside your browser, which is also why this online document scanner works without installing a scanner app.
Corners, perspective and paper size
Corner detection is a classic edge-and-contour method, not a model, so there is nothing to download — and it has a known weak spot: when the paper and the desk are close in colour, white paper on a white or light desk, it often fails or grabs the wrong shape. When that happens, drag the four handles yourself; a magnifier above your finger shows exactly where the corner sits. A dark desk gives the best results. The correction is a flat perspective transform: it is right for a sheet lying flat and only approximately right for a book opened across the spine or a curled receipt — the page is straightened, but the curve is not flattened out. Paper size is one setting for the whole scan: auto reads the ratio of each page and snaps it to A4 or Letter when it is close, A4 and Letter force that size, and free keeps the detected ratio and sets the PDF page to the image at 300 dpi. If pages in auto land on different sizes, the whole PDF falls back to free so page sizes do not jump.
Filters: original, enhance, grayscale, black and white
Each page has its own filter. Original keeps the colours after the perspective fix. Enhance, the default, estimates the uneven lighting across the page and divides it out, so a shadow from your hand or a lamp on one side becomes an even white background, then stretches the contrast; colours stay, so a red stamp or a highlighted line survives. Grayscale drops colour but keeps the tones. Black and white turns every pixel into either ink or paper, which gives the smallest, sharpest result for plain printed text — and loses everything that is not high-contrast ink: photographs, light pencil, a pale blue signature and most stamps simply disappear. For a document that carries a stamp or a signature you need to keep, use enhance, not black and white.
Pages and output
A scan can hold up to 50 pages. Each page can be moved up or down, rotated in 90-degree steps, deleted, or retaken from the camera or replaced by another photo, and each one keeps its own corners and filter. Very large photos are scaled so the long edge is 3200 pixels before processing, which is more than enough for an A4 page at 300 dpi and keeps a 12-megapixel phone photo from eating the browser's memory. Output is one PDF named scan.pdf, built by the same code as /images-to-pdf with your paper setting, or one JPEG per page named scan-01.jpg, scan-02.jpg and so on, with the rotation baked into the pixels. The PDF contains images only — this page does not recognise text, so the result cannot be searched or copied. To pull the text out of a page, send it to /image-to-text; to add a signature to the finished PDF, open it in /pdf-sign.