How OCR detects tampered or fake documents
21 Jun 2026·Mahad OCR·3 min read
Reading a document is only half the job. The other half is knowing whether to trust it. Photoshopped passports and edited invoices are a real problem — so Mahad OCR runs a tamper panel on every upload and returns a single tamper score.
The 5 checks
- EXIF inspection: editing software tags (Photoshop, GIMP) in the image metadata.
- MRZ checksum: passport machine-readable zones have built-in check digits that must compute correctly.
- Error-Level Analysis (ELA): re-saved or pasted regions stand out under recompression.
- Background noise: spliced or synthetic areas break the natural sensor-noise pattern.
- Re-upload detection: a previously blocked image is recognised by its hash and rejected.
One score, clear actions
The checks combine into a tamper score from 0 to 1. Clean documents pass; suspicious ones are routed to human review; clearly fake ones are blocked — with the reason recorded in a hash-chained audit log.
curl -X POST https://api.mahadocr.com/v1/documents/upload \ -H "X-MahadDoc-API-Key: YOUR_KEY" \ -F "file=@document.jpg" # poll the result curl https://api.mahadocr.com/v1/documents/DOC_xxx \ -H "X-MahadDoc-API-Key: YOUR_KEY"
Because it runs automatically on every document, you catch fraud before it reaches a person — without slowing down legitimate users.
Try Mahad OCR on your own documents
Sign up free, get an API key, and read your first document in minutes — passports, IDs, invoices, statements and more.
Get your API key or try the live demo →