AI document cleanup

Clean up scanned & photographed documents

Drop a photo of a page. Our AI pipeline removes shadows, dewarps the perspective, sharpens the text, and can upscale low-DPI scans — for a clean, scanner-quality result.

Drop a scanned or photographed document
JPG · PNG · WebP — deshadow, dewarp, and sharpen with AI
PNG · JPG · WEBP · max 40.0 MB
Scan cleanup is a Pro feature.

The complete guide to cleaning up scanned documents

Turn a messy document photo into a clean scan

Most of us no longer own a scanner — we photograph documents with a phone. The trouble is that a handheld photo of a page is rarely usable as-is: there's a shadow across one corner, the page is slightly curled or shot at an angle, and the contrast is muddy so the text looks grey rather than black. Scan cleanup fixes all of that automatically, turning a quick snapshot into a document that looks professionally scanned.

It does this with an AI pipeline built specifically for documents. Rather than a single generic filter, it runs a sequence of targeted stages — shadow removal, dewarping, contrast enhancement, and optional upscaling — each solving one of the problems that make phone photos of paper look bad. You choose which stages to apply, and the work runs on our GPUs so even large, high-resolution scans process quickly.

Shadow removal: an even, white page

The most common defect in a document photo is uneven lighting. Whether it's the shadow of your own hand, a gradient from a nearby lamp, or the darker fall-off toward the edges of the frame, that variation makes the page look dirty and makes downstream OCR less accurate. The deshadow stage models the page's background illumination and divides it out, so the paper becomes a uniform white from corner to corner.

This single step is often the difference between a photo that looks like a snapshot and one that looks like a scan. It's especially valuable for receipts and forms photographed on a desk, where the lighting is almost never flat.

Dewarping: flat pages and straight text

Paper curls, books don't lie flat, and a camera held at any angle introduces perspective distortion. The dewarp stage uses a document-geometry network (DocTr) that understands what a flat page should look like and remaps the image so the text lines become straight and horizontal and the page edges become a true rectangle. It corrects both the physical curl of the paper and the perspective of the shot in one pass.

Flat, straight text isn't just nicer to read — it dramatically improves the accuracy of any OCR you run afterwards, because recognition models are trained on upright, undistorted text. If your only problem is a warped page, you can run dewarp on its own and leave the other stages off.

Contrast enhancement and optional upscaling

Once the page is evenly lit and flat, the enhance-contrast stage sharpens the separation between ink and paper, pushing the background toward pure white and the text toward solid black. The result reads cleanly on screen and prints crisply, and it compresses well because the page is mostly uniform white.

For older or low-resolution scans, the optional 2× upscale runs a super-resolution model that reconstructs detail rather than simply enlarging pixels, recovering legibility in small print. Because each stage is a toggle, you only pay the time cost of the steps your document actually needs.

Where scan cleanup fits in your workflow

Scan cleanup pairs naturally with the rest of the OpusImg document toolkit. Start with the ID card cropper to crop and straighten a card or page, run scan cleanup to remove shadows and sharpen it, then send the result through OCR to make the text searchable. Finally, combine several cleaned pages into a single document with Image to PDF.

Whether you're digitising paperwork for an application, archiving handwritten notes, or just trying to read a faint receipt, the cleanup pipeline gives you a scanner-quality result from nothing more than a phone photo — no flatbed, no app, and no fiddling with sliders.

Frequently asked questions

What does scan cleanup do?

It takes a photographed or scanned document and runs it through an AI restoration pipeline: it removes uneven shadows and lighting, dewarps the page to undo curl and perspective, boosts contrast so text is crisp black-on-white, and can optionally upscale a low-resolution scan. The result is a clean, even, readable document that looks like it came off a professional scanner.

What is dewarping?

When you photograph a page — especially from a book or a curled sheet — the lines of text bend and the edges look slanted. Dewarping uses a document-geometry model (DocTr) to flatten the page back to a rectangle with straight text lines, correcting both the curl and the camera perspective at once.

How does shadow removal work?

Phone photos of documents almost always have a shadow — from your hand, your phone, or the light source. The deshadow stage estimates the page's background lighting and divides it out, leaving an even white page. It's the single biggest improvement for most handheld document photos.

Is scan cleanup free?

Scan cleanup is a Pro feature because it runs on our GPUs. Free accounts can see the tool and the pipeline options, but running a cleanup requires a Pro plan. If you only need to crop and straighten a document, the ID card cropper is free to try and runs entirely in your browser.

Can I choose which steps to run?

Yes. Each stage — remove shadows, dewarp & straighten, enhance contrast, and upscale 2× — is an independent toggle. If your scan is already flat but just dim, you might run only deshadow and enhance. If it's sharp but warped, run only dewarp. You send exactly the stages you need.

What kinds of documents work best?

Receipts, contracts, forms, letters, book pages, handwritten notes, whiteboards, and any printed page benefit. The pipeline is tuned for documents with text and line art on a light background. Glossy photos or full-colour images aren't the target — those are better served by the editor's adjustment tools.

Will it make my text searchable?

Scan cleanup produces a clean image, not a text layer. To extract or search the text, run the cleaned result through the OCR tool, which recognises the words; the Pro OCR option can even produce a searchable PDF with a hidden text layer over the cleaned image.

How large a file can I upload?

You can upload documents up to 40 MB. High-resolution phone photos and multi-megapixel scans are fine — in fact, more resolution gives the dewarp and contrast stages more detail to work with. Very large images are processed at full quality on the server.

Is my document kept private?

Your scan is uploaded over an encrypted connection, processed on our GPUs, and the cleaned result is returned to you. Inputs and outputs are stored only as long as needed to deliver your result and are removed on our standard retention schedule. We never use your documents to train models.

What format is the output?

The cleaned document is returned as a PNG, which is lossless so text edges stay sharp with no compression artefacts. You can then combine several cleaned pages into one file with the Image to PDF tool, or open the result in the editor for redaction and annotation.