Document Scanner with Webcam

Scan paper documents with your webcam or phone camera. Drag the corners to fix perspective, auto-enhance, and export a multi-page PDF or JPGs.

🌐 Español

Starting camera — allow the camera permission when your browser asks…

🔒 Private by design: everything runs locally in your browser and never uploaded to any server.

The homography behind the four handles

A photograph of a document taken by hand is never square on. The page leans, the far edge looks shorter than the near one, and the text runs at a slight angle. That keystone distortion is the single thing that makes a phone snapshot look amateur next to a real scan, and it is not fixable by rotating or cropping.

What fixes it is a projective transform. Once you have marked the four corners, the tool sets up an eight-by-eight linear system from those four point correspondences and solves it by Gauss-Jordan elimination with partial pivoting, producing the three-by-three matrix that maps your leaning quadrilateral onto a clean rectangle. The flattening then works backwards: for every pixel of the output page it applies that matrix to find where the pixel came from in your photo and samples there with bilinear interpolation. Going output-to-source rather than source-to-output is what guarantees the result has no holes in it. Anything that maps outside your photo comes back white, so a slightly generous corner placement gives you paper-coloured margin rather than garbage.

Capture, drag, add page, export

  1. Allow the camera when your browser asks. The live preview appears and Capture becomes clickable.
  2. Fill the frame with the document and click Capture to freeze the frame.
  3. Drag the four corner handles onto the corners of the page, choose an Enhancement, and click Add page.
  4. Repeat for the rest of the document, then click Download PDF for one combined file or Download JPGs for separate images.

Retake throws away the current frame and puts you back on the live preview without adding anything.

Four enhancement modes, and what each one does to a pixel

The Enhancement menu is not a set of filters with vague names. Each option is a specific per-pixel function, and the default is Auto-enhance.

The queue, the page sizes and the file names

Each page you add joins a strip below the preview with numbered badges and per-page arrows to move it left or right plus a cross to delete it. The camera goes straight back to live so you can keep going. Nothing is committed until you export.

Download PDF builds one document with your pages in the order shown, each page given its own dimensions at one point per captured pixel, and names it from today’s date in the form scan-2026-08-01.pdf. Download JPGs saves each page separately as scan-2026-08-01-page-01.jpg and so on; with a single page the button reads Download JPG and the file name skips the suffix. If you would rather control the paper size yourself, take the JPGs to Convert JPG to PDF, which accepts the whole set at once and offers A4, US Letter or fit-to-image.

Camera permission, rear cameras and the retry button

The camera request asks for the environment-facing lens at roughly 1920 by 1080 as a preference, never as a hard requirement, so laptops and desktops with a single front-facing webcam are handled without a separate code path. While the browser is deciding, the preview area says so and the Capture button stays disabled, which is why clicking too early does nothing.

If you refuse the permission, or the browser has remembered a refusal, you get an explicit explanation and a Retry camera access button rather than a dead screen. Leaving the page stops the camera track and releases every preview image. Unlike the shared tools on this site, this widget surfaces real messages: capture before the video is ready and it tells you to wait a moment, and a degenerate corner selection tells you to spread the handles into a proper quadrilateral.

Lighting beats every enhancement mode

No transfer function recovers detail the sensor never captured. Lay the page flat, kill any hard shadow crossing it, and fill as much of the frame as you can, because the flattened page can only ever be as detailed as the region you selected. Hold the camera roughly parallel to the paper even though the perspective correction will handle the rest, since an extreme angle means the far end of the page is sampled from very few real pixels.

For a document that is going to be read by a machine rather than a person, scan it here and then pass the PDF to OCR PDF to add an invisible, searchable text layer. If one page came out too dark, Adjust Image Brightness & Color will take the exported JPG and give you live sliders. And if you only want a plain photo with no page flattening at all, Take a Photo with Webcam is the simpler tool. The rest of the document toolset lives on the PDF tools hub.

Frequently asked questions

Does it find the edges of the page for me?

No, and that is deliberate. Automatic edge detection is the part of phone scanner apps that fails most often, on dark desks, patterned tablecloths, or pages that reach the edge of the frame. Here four handles start at an inset rectangle covering most of the captured frame and you drag them onto the real corners. It takes a couple of seconds and it never guesses wrong.

Does the order I drag the handles in matter?

Not at all. Before the page is flattened, the four points are sorted into a canonical top-left, top-right, bottom-right, bottom-left winding by comparing their coordinate sums and differences. Whichever handle you happen to move onto which corner, the geometry ends up the same. What does matter is that the four points form a proper quadrilateral. A collinear or coincident selection usually has no solvable transform and you will be asked to spread the handles out, but a selection that is merely close to degenerate can still go through and hand you a small unusable page, so check the result.

How big is the flattened page, in pixels?

It is measured from your own corner placement. The width is the longer of the top and bottom edges you marked, the height is the longer of the left and right edges, both rounded to whole pixels. Taking the longer edge of each pair means nothing you selected gets cropped off by the foreshortened side. Corners at 100,120 and 900,60 and 960,1200 and 40,1100 produce a page of 925 by 1142 pixels.

Why do my PDF pages come out slightly different sizes?

Because each page is sized from its own capture. The PDF is built by giving every image a page exactly as wide and tall as that image, at one point per pixel, with the picture drawn edge to edge. Hold the camera a little closer on page three and page three is a little larger. If you need every page identical, export the JPGs instead and feed them to this site's JPG to PDF tool, which lets you pin everything to A4 or US Letter.

Which camera does it ask for, and what if permission was denied?

It requests the rear, environment-facing camera at around 1920 by 1080, since that is the natural one for photographing paper on a desk, but it asks for that as a preference rather than a requirement so a laptop with only a front camera still works. If you block the permission, you get a message explaining what happened and a Retry camera access button, so you can fix it in your browser settings and try again without reloading.

How many pages can I put in one scan?

There is no coded limit. Pages accumulate in a queue you can reorder and prune, and the export runs when you say so. The practical ceiling is your device's memory, because every page is held as an image and the whole set is assembled at once when the PDF is built, so a very old phone will start to struggle long before a laptop does.

Related tools