OCR6 min

Scan a Paper Receipt and Get Structured JSON (Local OCR Guide)

Turn a phone photo of a receipt into structured JSON — merchant, date, line items, totals — entirely in your browser. Ready for expense tools, spreadsheets, or LLM prompts.

Zro7 Receipt Scanner runs Tesseract.js locally. Receipts never leave your device — important for expenses that include names, cards, or client info.

To turn a receipt photo into structured JSON, open Zro7 Receipt Scanner, drop the image, and Zro7 runs OCR plus a receipt-specific parser to extract merchant, date, currency, line items, subtotal, tax, tip, and total. The output is copyable JSON, no cloud API, no receipt-scanning subscription.

The pipeline

  1. Preprocess — auto-crop, deskew, and boost contrast for thermal-print receipts.
  2. OCR — Tesseract.js with a single-column page-segmentation mode (thermal receipts are always one column).
  3. Layout parse — group tokens by Y-coordinate to reconstruct rows; align columns via clustered X-positions.
  4. Semantic extract — regex + heuristics for date formats, currency symbols, tax lines ('SUBTOTAL', 'TAX', 'TOTAL', 'AMOUNT DUE', translated), and line-item price detection.
  5. JSON emit — a schema close to popular expense APIs (Ramp, Brex, Expensify) so you can paste it in.

Sample output

For a Starbucks receipt you'll get roughly:

{ "merchant": "Starbucks Coffee", "date": "2026-11-14", "currency": "USD", "items": [{"name": "Grande Latte", "qty": 1, "price": 5.45}, ...], "subtotal": 12.90, "tax": 1.16, "tip": 2.50, "total": 16.56 }

What works well

  • Standard thermal receipts from restaurants, cafes, gas stations, and retail.
  • Multi-page receipts (Zro7 parses each and merges).
  • USD, EUR, GBP, JPY, INR, and other common currencies (auto-detected by symbol).

What still trips it up

  • Very faded thermal print — bring the receipt closer to a window or scan with the camera flash.
  • Handwritten totals — Tesseract skips them; edit the JSON manually.
  • Non-Latin scripts — enable the extra language (e.g. Japanese) in the settings drawer.
  • Split checks — parsed as one receipt; split the JSON manually.

Steps

  1. Open Receipt Scanner.
  2. Take or drop a photo of the receipt.
  3. Wait for OCR + parse (usually 3–8 seconds).
  4. Copy the JSON, or export as CSV for a spreadsheet.

Frequently asked questions

Why not use an app like Expensify?

Their pipeline is the same idea but sends receipts to a cloud OCR service. Zro7 keeps merchant, card last-four, and totals on-device — often required for regulated industries.

Can I batch dozens at once?

Yes — drop a folder of images and Zro7 runs them in parallel Web Workers.

How accurate is the total?

In our internal test set of 500 receipts, ~94% had a correct extracted total. Line-item accuracy is around 88%.

Does it handle currency conversion?

No — it just detects the currency. Convert downstream with your exchange-rate source of truth.

Any upload?

None. Everything is local.

Related posts

← Back to blog