New Tool Radar

AI PDF

How to Check the VAT Number Format on a Scanned Invoice

Check the VAT number OCR reads from a scanned invoice and verify its format before you file the invoice.

Schematic illustration of a VAT number check: run OCR, read the VAT number, and check its format for the country.

A VAT number has a fixed format per country, and OCR can drop a digit or read a letter as a digit, which makes the number invalid for filing. The check is to read the number, test its format, and compare it with the printed invoice. This guide checks one VAT number.

Prerequisites

A scanned invoice PDF and an OCR tool. Note the expected VAT format for the supplier country before starting.

Steps

1. Run OCR on the invoice

Run OCR on the invoice and save the text. Expected result: the VAT number becomes selectable text.

2. Read the VAT number from the OCR text

Read the VAT number from the OCR text. Expected result: the number reads GB 842 1739 55.

3. Check the format for the country

Check the number against the UK VAT format: GB followed by nine digits. Expected result: the format is valid, with nine digits after GB.

4. Compare with the printed invoice

Compare the VAT number with the printed invoice. Expected result: the number matches the printed invoice character for character.

Practice check: fictional scanned invoice with UK VAT number

The table below is fictional practice material. It lists the VAT number check.

Item Value
VAT number GB 842 1739 55
Country prefix GB
Digits 9
Format Valid

Expected result. the VAT number reads GB 842 1739 55, its format is valid for the UK, and it matches the printed invoice.

Limits

  • A VAT number with a valid format can still be unregistered, so check it against the tax authority register when the invoice matters.
  • UNTESTED – no OCR tool or AI tool was run; all results above are expected results. The practice file is fictional.

Sources

See all