Receipt OCR: How Receipt Scanning Works
Written by Darshan Thakor, founder of ScanMyReceipt · Published · Updated
Receipt OCR turns a photo of a receipt into details you can search and export: merchant, date, total, tax and more. Here's what happens between tapping the shutter and seeing those fields, using ScanMyReceipt's own pipeline as the example.
What OCR means for receipts
OCR, optical character recognition, is the technology that reads text in an image. Plain OCR gives you a block of text. A receipt scanner needs more than that: it has to work out which number is the total, which line is the merchant, and which date is the purchase date. Modern receipt scanners pair text reading with AI models that understand a receipt's layout and return each detail as a separate field.
Receipts are harder than most documents. Layouts vary by store, fonts are tiny, thermal paper fades, and photos come with creases, shadows and glare.
How receipt scanning works, step by step
This is the path a receipt takes in ScanMyReceipt:
1. Capture Camera with on-screen guide, or the phone's document scanner
| (ML Kit on Android, VisionKit on iOS), or gallery import
v
2. Prepare Crop to the receipt; make a resized working copy for reading.
| The original image is kept unchanged.
v
3. Save Receipt saved on your phone first; queued if you're offline
|
v
4. Upload Image uploaded to your account when you're online
|
v
5. Read Server-side AI (Google Gemini) reads the receipt and returns fields
|
v
6. Sync Fields saved to the receipt and synced back to your phone- Capture. A sharp, flat, well-lit photo matters more than anything that happens later. The document scanner finds the receipt's edges and flattens the image for you.
- Prepare. The app crops to the receipt and makes a smaller working copy for the AI, which uploads faster. Your original image is never modified.
- Save locally. The receipt is saved on your phone straight away, so a dead zone doesn't lose it.
- Upload. When you're online, the image is uploaded to your account.
- Read. The image is sent to Google Gemini, which reads the text and returns the details as structured fields.
- Sync. The fields are saved and appear on your phone, ready for you to check.
What gets read from a receipt
| Field | How it's handled |
|---|---|
| Merchant | The brand name, without legal suffixes or the address |
| Address | The store address, when printed |
| Date and time | The purchase date and time |
| Currency | A three-letter code; left for you to confirm when the receipt doesn't make it clear |
| Total | Exactly as printed, not recalculated |
| Tax | Multiple tax lines are added together; tax-included receipts are flagged |
| Payment method | Card type or cash, when shown |
| Category | A suggested category you can change |
| Line items | Name, quantity, unit price and line total for each item |
| Extras | Store and receipt numbers, tips, discounts, delivery and service charges |
When a field isn't on the receipt or can't be read, it's left empty rather than guessed. The OCR receipt scanner page shows a worked example with every field.

What can go wrong, and how to help it
- Faded thermal paper: scan receipts soon after you get them. Thermal print fades with heat, light and time.
- Glare and shadows: use even daylight and hold the phone directly above the receipt.
- Crumpled receipts: smooth them flat on a dark surface before scanning.
- Unusual layouts: handwritten receipts and very long receipts are the hardest; check the total and date afterwards.
Our guide to turning paper receipts into digital records covers capture technique in more detail.
Why you should still check the results
No receipt scanner is perfect. A quick check of merchant, date and total takes a few seconds and matters most, because those fields drive search, category totals and exports. Every field can be edited, and the original image stays with the receipt so you can always compare.
OCR also can't know your context: whether a meal was with a client, or which project a purchase belongs to. That's what categories, tags and notes are for.