Skip to main content

Document Scanner — Free Online Phone-to-Scan Tool

Turn any phone photo of a document into a flat, perspective-corrected scan. OpenCV.js detects the page edges, warps it to a rectangle, and exports a clean PNG or PDF.

Tap to select a file

Supports JPG, PNG, WebP, up to 25MB

Runs entirely in your browser

What to do next

Related tools

About Document Scanner

The simplest use of a phone camera is also one of the most underserved by free browser tools: take a photo of a document and turn it into a flat scan. Mobile scanning apps do this with paywalls and data-collection policies. The Document Scanner does the same job entirely in your browser, with OpenCV.js running over the photo to find the page, fix the perspective, and export a clean rectangular scan.

The pipeline is the classical computer-vision recipe used by every scanner app. The photo is converted to grayscale, lightly blurred to suppress noise, run through a Canny edge detector to highlight strong gradients, and scanned for contours. The largest four-sided contour is treated as the page boundary. The four corners get sorted into top-left/top-right/bottom-right/bottom-left order, a perspective-transform matrix is computed, and the original colour image is warped onto a rectangle the size of the implied target page. The result looks like the document was scanned on a flatbed instead of photographed at an angle.

Edge detection works best when the document is on a clearly contrasting surface — a white page on a dark desk, a coloured form on a light table, a contract held up against a darker wall. It struggles when the page edges blend into the background (a white page on a white desk, a tan-coloured business letter on a wood-grain surface) or when the photo is so blurry that the Canny detector cannot find a clean four-sided shape. For those cases, the auto-detected corners can be dragged manually before the warp is applied, so you always get a usable scan.

Three optional finishing filters cover the common output styles. Whiteboard removes shadows and boosts contrast so the page reads as bright white with sharp black text. Document keeps the natural colours of a printed form or invoice while flattening uneven lighting. Black-and-white converts to a high-contrast pure-monochrome scan suitable for photocopier-style archives. Output is always PNG so detail is preserved; chain the result through Image to PDF if you want a multi-page document, or Compress Image to shrink the file.

How it works

  1. 1Take a phone photo of the document, or drop an existing photo into the upload area. JPG, PNG and WebP up to 25 MB are accepted.
  2. 2On first use, OpenCV.js downloads from the Favtoo CDN and is cached in your browser. This is a one-time ~10 MB cost per device.
  3. 3The photo is converted to grayscale and run through a Canny edge detector. The largest four-sided contour is identified as the page boundary.
  4. 4The four corners are shown overlaid on the photo. If the auto-detection picked the wrong contour, drag the corners to the correct positions.
  5. 5A perspective-transform matrix is computed and the original colour image is warped onto a rectangle, producing a flat, head-on scan.
  6. 6Apply an optional finishing filter — Whiteboard, Document, or Black & White — and download the PNG. Chain through Image to PDF for multi-page output.

Common use cases

  • Scan a printed receipt with your phone for an expense report so the result looks like it came off a flatbed
  • Capture a handwritten meeting note on a whiteboard so the photo reads as a flat, high-contrast image
  • Digitise a stack of business cards for archiving or for input into a contact extractor
  • Scan a multi-page contract page-by-page and combine the results into a single PDF for email
  • Photograph a notebook page during a class or interview and turn it into a clean square scan to paste into a notes app
  • Capture a printed boarding pass or visa form so it can be re-uploaded to a portal that needs a flat scan instead of a photo

FAQ

How does it find the page edges?

OpenCV.js applies a Canny edge detector to the photo, finds the largest four-sided contour, and treats that as the page boundary. You can drag the corners to fix the result if the auto-detection picks the wrong contour.

Does it work on receipts, business cards and notebook pages?

Yes — anything roughly rectangular against a contrasting background. Lined notebook paper works best when there is a clear edge between the page and the desk.

Will my photo be uploaded?

No. OpenCV.js is fetched once on first use and cached in your browser. Edge detection, warping and the export all happen locally inside the tab.

Can I export multiple pages as a PDF?

Yes — scan each page in turn, then stack them into a single PDF with Image to PDF.

Is the scan colour-corrected?

A "Whiteboard" filter that boosts contrast and removes shadows is included. For black-and-white scans use the Black and White Converter on the result.

Why does it sometimes pick the wrong contour as the page?

Edge detection finds every strong gradient in the photo — sometimes a window frame, a desk edge, or a high-contrast shadow forms a larger four-sided shape than the actual document. When that happens, drag the four corner handles onto the real page corners. The warp is computed from your corrected positions, so the output is correct regardless of what the auto-detection chose.

Can it handle multi-page documents?

The scanner processes one photo at a time. For a multi-page document, scan each page separately, then chain the resulting images through Image to PDF to bundle them into a single output. Each page goes through its own perspective correction so it does not matter if the pages were photographed at different angles.

Does it work for receipts and other oddly-shaped paper?

Yes. The four-corner detector works on any rectangular paper, regardless of dimensions. Long thin receipts, square business cards, A4 forms, US Letter pages, and notebook pages have all been tested. Heavily creased or torn paper is the hardest case — if there is no clean rectangular boundary, the auto-detection may fail and you will need to set the corners manually.

Will my photo be uploaded?

No. OpenCV.js is fetched once from our CDN and cached locally. Edge detection, contour finding, perspective warping, and the optional filters all run inside your browser tab. The photo bytes are never sent to a server.

How is the colour fidelity in Document mode?

Document mode keeps the original colour palette but applies an illumination-correction step that flattens uneven lighting (for example, a shadow falling halfway across a page from a desk lamp). The result looks like the page was lit evenly. If you want to preserve the original look exactly, skip the filter step entirely.

Is the output good enough to OCR?

Generally yes. Run the scanned PNG through Image to PDF to wrap it as a single-page PDF, then through OCR PDF to add a searchable text layer. Document scanner output is usually higher quality than the original phone photo precisely because the perspective fix straightens text lines, which makes OCR substantially more accurate.

Does it work on a phone browser?

Yes. The OpenCV.js download and the WebAssembly compile both succeed on modern mobile browsers; processing is a few seconds slower than on desktop but well within usable bounds. You can also point the camera directly through the upload field on iOS and Android — the browser will offer a "Take Photo" option.

AI Image Upscaler 2×

Double the resolution of any photo while sharpening detail. Real-ESRGAN runs entirely in your browser to enlarge low-res images without the soft, blurry look of standard scaling.

AI Profile Picture Maker

Crop any photo into a perfectly centred profile picture. face-api.js detects the face in your browser and frames it for square, circle or 4:5 PFP exports.

AI Pose Detection

Detect 17 body-pose keypoints in any photo with the MoveNet Lightning model. Exports the original image with a skeleton overlay plus a JSON file with every keypoint and its confidence score.

Add Noise to Image

Add monochrome film grain, colour noise, or salt-and-pepper specks to any photo. Choose noise type and amount; the result is rendered into a real PNG file in your browser.

Censor / Blur Region

Permanently censor a rectangular region of any photo with pixelation, blur, or a solid black bar. Specify exact x/y/width/height coordinates and the censor is baked into a real PNG — no recoverable original.

Skew Image

Apply real horizontal and vertical shear to any photo, turning a rectangle into a parallelogram. Choose X-skew and Y-skew angles from −60° to +60°; the tool re-renders to a real PNG with transparent corners.

Pixel Sorter

Apply real pixel-sorting glitch art to any photo: sort each row or column by brightness, hue, or saturation, with a threshold to control which pixels get included. Real PNG output.

Recompress JPEG

Upload a JPEG and re-compress it at a lower quality to reduce file size. Automatically strips EXIF metadata.

View all Image Tools