Creation

Document Scanner

Scan documents with edge detection, perspective correction, and multi-page PDF export - 100% private.

Your files stay on your device - processed locally via WebAssembly, never uploaded

Drop a photo of a document

JPEG, PNG, WebP, HEIC

All scanning, perspective correction, and PDF assembly happens in your browser. No camera-roll permissions, no app, no upload.
Share this tool with othersHelp others discover free tools
Embed this tool on your website

Copy this code to add the Document Scanner to your site for free. It runs entirely in your visitors' browsers - no API key, no usage limits.

<iframe src="https://optipix.art/embed/document-scanner" width="100%" height="600" style="border:1px solid #e4e4e7;border-radius:8px;" title="Document Scanner by OptiPix" loading="lazy"></iframe>
<p style="font-size:12px">Free tool by <a href="https://optipix.art/document-scanner">OptiPix Document Scanner</a></p>

Browse all embeddable tools

About Document Scanner

Last updated:

OptiPix Document Scanner turns your laptop or phone camera into a private document scanner. Capture or upload a photo of a document, ID, receipt, or whiteboard - auto-detect the four corners, correct perspective with a real homography transform, then enhance with adaptive binarization (B&W scan), grayscale, color, or high-contrast modes. Add multiple pages and download as a single multi-page PDF, individual PNG/JPEG files, or a ZIP. The output is a perfectly straight, rectangular document image - exactly like CamScanner or Adobe Scan, but everything runs in your browser. No camera-roll permissions, no app, no upload. Manually drag the four corners if auto-detection isn't perfect. Perfect for scanning contracts, IDs, receipts, handwritten notes, and book pages - privately.

How It Works

Edge detection finds dominant lines and the largest quadrilateral contour. The four corners feed a 3×3 homography (DLT) that maps the source quad to a true rectangle. Adaptive binarization (Sauvola/Otsu) produces clean B&W scans. Multi-page PDFs are assembled with pdf-lib.

Use Cases

  • •Scan a contract on the kitchen table without uploading it
  • •Digitize receipts for expense tracking
  • •Scan a handwritten notebook page to PDF
  • •Capture an ID card without granting CamScanner access to your camera roll
  • •Photograph a whiteboard and turn it into a clean rectangular scan

You Might Also Like

If you find Document Scanner useful, check out these related tools: OCR Text Extractor, Image to PDF, and EXIF Remover. All tools run entirely in your browser with no uploads or signups required.

What the Document Scanner is good at - and what it isn't

What turns a photo of a document into something that looks scanned is one step: perspective correction. Edge detection finds the largest quadrilateral in the frame, and a homography maps those four corners onto a true rectangle - so a page shot at an angle comes out square, as if it had been laid on a flatbed.

After that, adaptive binarisation (Sauvola or Otsu) decides per-region what counts as ink and what counts as paper, which is what removes the shadow of your own hand from the page. Multi-page documents are assembled into a single PDF, in the browser, which is the right place for the contracts and ID documents people scan.

Frequently Asked Questions

How does this compare to CamScanner?
OptiPix runs the entire pipeline - camera capture, edge detection, perspective correction, enhancement, and PDF export - in your browser with zero uploads. CamScanner uploads scans to its servers; OptiPix never does.
Can I scan multiple pages into one PDF?
Yes. Add as many pages as you want, reorder them with drag-and-drop, then export everything as a single multi-page PDF.
Will this work on my phone?
Yes. The scanner uses getUserMedia for camera access, which works on iPhone Safari, Android Chrome, and any modern mobile browser. No app install needed.
What's the difference between B&W, Grayscale, and Color modes?
B&W applies adaptive binarization for crisp text - best for printed documents. Grayscale keeps shading. Color preserves the original colors - best for receipts, IDs, and colored documents. High Contrast boosts contrast without binarizing.
What if the auto edge detection misses a corner?
After capture you can drag any of the four corners to fine-tune. The perspective transform updates in real-time so you can see the corrected output as you drag.

Articles about Document Scanner

10 more articles in the blog

Related Tools

More Content Creation Tools

All 131 Tools

Image CompressorBackground RemoverVideo CompressorImage UpscalerOCR Text ExtractorFormat ConverterImage ResizerEXIF RemoverFace BlurDepth EstimationQR Code GeneratorWatermark MakerColor Palette ExtractorPhoto FiltersImage to PDFObject DetectionImage ClassifierImage CaptionerAI Image GeneratorMeme GeneratorGIF MakerPhoto Collage MakerImage CropPhoto EffectsImage to SVGColor ChangerNoise RemoverPhoto RestorationColor PickerFavicon GeneratorImage to Base64Image Metadata ViewerImage AnnotatorPassport Photo MakerDocument ScannerASCII Art GeneratorImage ComparisonSprite Sheet GeneratorObject RemoverPanorama MakerWord CounterCase ConverterLorem Ipsum GeneratorUUID GeneratorText DiffURL Encoder / DecoderHTML Entity Encoder / DecoderBase64 Text Encoder / DecoderText to Binary / Hex / OctalHash GeneratorJSON Formatter / ValidatorRandom String GeneratorCSV ↔ JSON ConverterMarkdown EditorUnit ConverterPercentage CalculatorBMI CalculatorAge CalculatorTip CalculatorCSS Gradient GeneratorCSS Box Shadow GeneratorCSS Border Radius GeneratorGlassmorphism GeneratorNeumorphism GeneratorCSS Text Shadow GeneratorFlexbox PlaygroundCSS Grid GeneratorAudio TrimmerAudio ConverterAudio MergerAudio RecorderVideo to Audio ExtractorAudio Speed ChangerAudio Volume BoosterRingtone MakerVocal RemoverText to SpeechSpeech to TextAudio Noise RemoverAudio EqualizerAudio EffectsVideo TrimmerVideo MergerVideo ResizerVideo Speed ChangerVideo RotatorVideo to MP4 ConverterAdd Music to VideoMute VideoVideo LooperReverse VideoVideo ScreenshotAdd Subtitles to VideoVideo WatermarkScreen RecorderWebcam RecorderSlideshow MakerVideo FiltersCron Expression BuilderRegex TesterUnix Timestamp ConverterHEIC to JPG ConverterWebP to JPG ConverterWebP to PNG ConverterPNG to JPG ConverterJPG to PNG ConverterCompress PDFPDF to JPG ConverterPDF to PNG ConverterMerge PDFSplit PDFRotate PDFJPG to PDF ConverterJPG to WebP ConverterPNG to WebP ConverterVideo to GIF ConverterAVIF to JPG ConverterTIFF to JPG ConverterSVG to PNG ConverterPNG to ICO ConverterGIF to MP4 ConverterWebM to MP4 ConverterMP4 to MP3 ConverterJSON to CSV ConverterBase64 to Image ConverterJFIF to JPG ConverterAVIF to PNG ConverterGIF to PNG ConverterMKV to MP4 ConverterMP4 to WebM ConverterMP4 to WAV Converter