How it works
Masking and reconstruction, not regeneration
The system is built around one rule: never redraw your printed content. Here's the full pipeline, end to end.
Open the document in your browser
A PDF page is rendered to a high-resolution image; a photo or scan has its embedded orientation applied so it is upright. This happens locally — the file is read by your browser and never uploaded.
You mark the handwriting
Brush over the handwriting you want gone. The stroke is an overlay: the original image underneath is never written to, and undo, redo and the eraser all operate on the mark rather than the document.
Refine the mark down to the ink
Your brush is treated as a region of interest, not a delete rectangle. Inside it, the local paper colour is estimated and only pixels that differ enough from that background count as ink — so a rough stroke over a line of writing removes the writing, not the paper around it.
Protect the printed document
Ink inside the mark is then sorted. Anything belonging to a shape that continues well outside your stroke is printed structure — a question line, a table rule, a circuit wire — and is kept. So is a thin straight run that carries on past the mark on the same line, which is how a wire crossed by handwriting survives. When the evidence is ambiguous the pixel is preserved, because leaving a stray mark is a smaller failure than destroying the question underneath.
Reconstruct with inpainting
Masked pixels are filled in using a diffusion-based reconstruction: each one is repeatedly averaged with its neighbours until the region converges to a smooth fill sourced entirely from the surrounding, untouched pixels. Nothing is generated or imagined — it is a numerical reconstruction of your own paper.
Recombine and rebuild
Cleaned pixels are merged back into the full-resolution page, and the result is verified: outside the final mask every pixel must be byte-for-byte identical to the original, or the result is rejected rather than shown. For PDFs, pages you never marked are copied through as the original page; pages you cleaned are rebuilt at the source page's dimensions.
What this guarantees
Every pixel outside a detected handwriting region is left byte-for-byte identical to your original file. That's not a tuning goal — it's a structural property of how the mask and the recombination step work: cleaned pixels only ever get written back inside the mask, nowhere else.
What it doesn't guarantee
It can't recover printed content that handwriting physically covers in the original — there's no second copy of the page to pull that from. It doesn't correct heavy tilt or perspective distortion in photos yet. And detection, like any model, isn't perfect: very faint pencil marks or handwriting that closely matches the printed ink color can occasionally be missed or partially caught. See the FAQ for more edge cases.
FAQ
Questions about the pipeline
Why not just ask an AI model to regenerate the page without handwriting?
Because that would risk changing wording, numbers, equations, or diagram details — a generative rewrite doesn't guarantee it reproduces your printed content exactly. This pipeline never regenerates printed content: it only ever touches pixels inside a detected handwriting region and reconstructs them from your own document's background.
What model is used for detection?
None. The shipped tool uses no AI service and no external API — you identify the handwriting yourself, and the removal is a numerical reconstruction that runs in your browser.
What happens if the AI provider isn't configured?
Processing fails immediately with a clear message explaining that the server's AI provider isn't set up. Nothing is faked — you'll never get a "cleaned" result that wasn't actually processed.
See it work on your document
Upload a file and watch each of these stages happen for real.
Upload a document