How to Extract Text From an Invoice Photo (and Check the Numbers Before You Use Them)

To extract text from an invoice photo, photograph it flat in good light, run it through an image to text converter, and check every number first.

A paper invoice arrives in the post, or a supplier emails you a photograph of one taken on their phone. You need the details in your accounts — the invoice number, the date, the line items, the tax, the total, the bank details — but the words are trapped in a picture. Typing them out by hand works for one invoice. By the fifth, your eyes glaze over, and that is exactly when a digit gets transposed and a payment goes to the wrong amount.

An invoice is not a receipt. A receipt proves you already paid; an invoice asks you to pay, and it carries the details a payment depends on — a due date, a reference number, and bank details. Our guide to receipt OCR covers the shorter, simpler receipt case. This guide is for the longer document: the one with a table of line items, a tax line, and a total that has to add up.

A photographed invoice next to the text extracted from it

Why Invoice Photos Are Harder to Read Than They Look

OCR reads shapes, not meaning, and an invoice photo breaks the clean grid that screenshots enjoy. Each break costs accuracy, and on an invoice the cost lands on numbers, where a single wrong digit changes what you owe.

ProblemWhat it does to the resultThe fix
Small line-item printItem descriptions and unit prices sit in the smallest type on the page, and the engine drops or merges charactersFill the frame with one page; photograph closer rather than farther away
Bold totals and faint body textThe total prints dark and clear while the line items print faint, so the engine reads the total and guesses the restUse soft daylight; turn the flash off so nothing is washed out
Folded or creased paperA fold line cuts through a row of figures and the engine reads the crease as a characterFlatten the invoice under a book for a minute before photographing it
Stamps and signaturesA rubber stamp or a signature lands on top of printed text and merges with itPhotograph the page anyway, then check the stamped area by eye
Currency symbols and decimals£, €, and $ look alike at small sizes, and a faint decimal point turns 49.50 into 4950Check every amount against the printed total; a sum that does not add up means a misread somewhere
Two-page invoicesThe second page holds the bank details and the payment terms, and it is the page people forget to photographPhotograph every page, in order, before you start converting

None of these is a reason to give up. They are the reason to spend thirty seconds on the photograph: a good photo is worth more than any setting in the converter.

How to Extract Text From an Invoice Photo in Five Steps

The whole job takes about three minutes for a one-page invoice once you have done it twice. Work in this order, and do not skip the number check at the end: text you have not checked is a draft, not a record.

  1. Flatten the invoice and photograph it straight above the page. Lay the invoice flat and smooth out folds with your palm. Hold the phone parallel to the page, directly over the centre, so the invoice fills the frame edge to edge. Check the preview: all four corners visible, lines level, no shadow from your phone or hand. Natural daylight near a window beats a ceiling light, and the flash should stay off — a flash on glossy paper creates a white hotspot that deletes the words underneath it. If your phone offers a document or scan mode, use it: it straightens the edges and evens out the light. If you are working on a phone, our guide to extracting text from an image on iPhone and Android covers the built-in tools on each system.
  2. Crop before you convert. Cut away the desk, the envelope, and the background. The engine reads everything it sees, and every stray mark costs accuracy. Crop to the edges of the invoice itself, and straighten the image if it is tilted: lines photographed at an angle shrink toward one edge, and the engine starts merging words. One page, one photo, every time — never photograph two pages side by side, or the converter will read straight across both and mix two columns of text.
  3. Run the photo through the converter. Open the image to text converter in your browser, upload the photo, and let it read the page. There is nothing to install and no account to create. The text appears underneath the image, editable, so you can fix mistakes before you copy anything. If the invoice is in another language, pick that language first: the engine reads each language with a different model, and the wrong one turns accented letters into guesses. Our multi-language OCR guide covers invoices and other documents in a second language.
  4. Copy the text into a place you can check it. Paste the result into a document or a spreadsheet, not straight into your accounting software. A document gives you room to compare the text against the photo line by line. If you need the text as a document rather than a paste, our guide to converting an image to a Word document walks through building an editable file from the extracted text. Keep the photo itself as well: the photo is your evidence if a supplier later disputes a figure.
  5. Check the numbers, then file it. Work through the six checks in the next section before the text goes anywhere near a payment. Only when the line items add up to the subtotal, and the subtotal plus tax equals the total, is the text ready to use. Write the invoice number and the date at the top of your filed copy while you still have the photo open; a set of figures without its reference number is hard to match to a payment later.

The Six Numbers to Check Before You Trust the Text

Text on an invoice is easy to get mostly right, and mostly right is not good enough when money moves. Check these six fields against the photo every time — the arithmetic check at the end catches errors in the fields above it.

FieldWhere it hidesThe common misreadThe check
Invoice numberTop right, or in a header block0 read as O, 1 read as l, 5 read as SRead it character by character; it is the reference your payment carries
Invoice dateNear the number, or in a "Date issued" lineMonth and day swapped on US-style dates (03/04)Confirm the date format the supplier uses before you record it
Line itemsThe table in the middle of the pageA quantity of 2 read as Z, a unit price with a dropped decimal pointAdd the lines up yourself; they must equal the subtotal
SubtotalDirectly under the line itemsA faint 1 or 7 dropped from the first digitSubtotal must equal the sum of the lines, to the penny
Tax or VATIts own line, often with a rate such as 20%The rate read correctly but the amount wrong, or the other way roundMultiply the subtotal by the rate; the result must match the printed tax
Total and bank detailsBottom of the page, often in boldA decimal point missed, turning 49.50 into 4950; a digit dropped from an account numberTotal must equal subtotal plus tax; read bank details digit by digit

If any check fails, do not guess which figure is wrong. Go back to the photo, find the figure on the page, and fix the text by hand.

When the Invoice Is Folded, Stamped, or Two Pages

  • A fold runs through the figures. Press the invoice under a heavy book for a minute or two, then photograph it again. If the crease still cuts a digit in half, photograph that corner a second time, closer in, and read the digit from the close-up yourself. Do not let the engine guess a number it cannot see.
  • A stamp or signature covers part of a line. The engine cannot read through ink, and neither can you from a bad photo. Photograph the stamped area from directly above in good light, then type the covered words by hand into the extracted text. Note the stamp itself in your filed copy — "Paid" stamps and approval signatures are part of the record, even though they are not part of the numbers.
  • The invoice runs to two pages. Photograph both pages before you convert anything, and convert them in page order. The second page usually holds the bank details and the payment terms, and it is the page that decides whether the payment goes through. If you have a stack of invoices to work through, our guide to converting multiple images to text at once shows how to run them through the converter as a batch and keep the results in order. Name the files as you go — invoice-1042-p1.jpg, invoice-1042-p2.jpg — so the pages never get separated.
  • The invoice is a photo of a screen. A supplier photographs their own monitor and sends you the picture. Expect wavy moiré patterns and washed-out text. Ask for a proper scan or a PDF if you can; if you cannot, photograph the screen straight on, turn the brightness down a little, and accept that you will be checking every line by hand.
  • The invoice is handwritten. A handwritten invoice, or one with handwritten additions in the margins, is a different job. Printed text is what OCR reads well; handwriting is what it guesses at. Our guide to handwriting to text explains honestly what the engine can and cannot read, and when typing it out yourself is simply faster. For a printed invoice with one handwritten note — "paid in cash, 12 Nov" — type the note in by hand and move on.

What to Do When the Text Comes Back Messy

Work through this list before you retype anything.

  • Whole lines are missing. The photo was probably taken too far away, or the page was curved. Photograph the page again, closer, flatter, and in better light. A lowercase letter needs to be roughly 20 to 30 pixels tall in the image for the engine to read it reliably.
  • Words run together with no spaces. The text is too small or the image is slightly blurred. Retake the photo and wipe the lens first — a fingerprint smear softens the whole image just enough to turn "rn" into "m" and "cl" into "d".
  • Numbers are right but the words are wrong. The language setting is probably wrong, or the invoice mixes two languages. Set the language to the one the invoice is printed in, and convert again.
  • The table comes out as one long paragraph. That is normal: plain-text output does not keep columns. Either rebuild the table by hand in a spreadsheet, or use our guide to extracting a table from an image to keep the rows and columns as a table.
  • Everything is wrong. Step back and look at the photo the way the engine sees it: is it upside down, is half the page in shadow, is the invoice photographed at a steep angle? Fix the photo, not the settings. Our book-page guide, how to extract text from a book page, covers the same photograph-first discipline for dense printed pages, and every tip there applies to invoices too.

Turning the Text Into a Record You Can File

  • For your accounts. Paste the checked figures into your bookkeeping software or spreadsheet, and attach the photo to the entry. The photo is the source document; the text is a convenience copy. If the figures are ever questioned, the photo answers it.
  • For a payment. Copy the invoice number into the payment reference exactly as printed, and the total exactly as checked. Never copy bank details from OCR output without reading them digit by digit against the photo — a wrong account number sends money to a stranger, and a bank cannot always get it back.
  • For your own archive. Save the text with a filename that includes the supplier and the invoice number, for example acme-supplies-INV-1042.txt. A folder full of files called invoice1.txt is no archive at all. Keep the photo in the same folder, under the same name.

What OCR Cannot Do With an Invoice

OCR gives you text; it does not give you understanding, and it does not make the invoice legally anything it was not before.

  • It cannot verify that the invoice is genuine. Extracted text from a forged invoice reads just as cleanly as text from a real one. If an invoice arrives unexpectedly, or the bank details have changed from the last invoice, check with the supplier through a channel you already trust before you pay.
  • It cannot tell you whether the figures are correct. The engine copies what is printed, including the supplier's own arithmetic mistakes. The six checks above catch misreads; they do not catch a supplier who added the lines up wrong. If your own addition disagrees with the printed total, ask the supplier — do not silently pay your own figure.
  • It cannot read what is not there. A faded thermal print, a photocopy of a photocopy, or a photo taken in a dark warehouse will defeat any OCR engine. In those cases the honest answer is to ask for a fresh copy, not to run the same bad photo through three different tools hoping one of them guesses right.
  • It does not turn a photo into a legal original. For tax and audit purposes, what counts is the document your tax authority accepts — in most cases the original invoice as issued. Extracted text is a working copy. Keep the photo or the original, and check your local rules before you throw paper away.

A Two-Minute Checklist

Run through this list for every invoice.

  1. The photo shows one page, flat, in good light, with all four corners visible.
  2. The photo is cropped to the invoice, with the background cut away.
  3. The language setting matches the language the invoice is printed in.
  4. The invoice number and date match the photo, character by character.
  5. The line items add up to the subtotal.
  6. The subtotal plus tax equals the total.
  7. The bank details were read digit by digit, not trusted from the first pass.
  8. The text and the photo are filed together under the supplier and invoice number.

References

← All guides