Belgian Enterprise Number and VAT Number Check
How a Belgian enterprise number is built, how to verify its check digits and how to derive the VAT number from it. Try the free lookup tool.
Your webshop gets a customer in Ghent, your invoicing system asks for a VAT number, and someone types BE 0123.456.794. It looks fine. But that number does not exist, because it contains a typo. If you are used to the Dutch KVK number, Belgian numbers work a little differently.
This article explains how the Belgian enterprise number is built, how to catch typos before you call any API, and how it relates to the VAT number.
What is an enterprise number
Every business in Belgium is listed in the Crossroads Bank for Enterprises (KBO in Dutch, BCE in French). The number it is registered under is the enterprise number. It has ten digits, usually written with dots: 0123.456.749.
It is the equivalent of the Dutch KVK number, with one big difference: the Belgian VAT number is simply the enterprise number with BE in front. A company with number 0123.456.749 has VAT number BE0123456749. In the Netherlands those are three separate identifiers, as covered in KVK Number, RSIN or VAT Number: Which ID to Store?. In Belgium you only need to keep one.
Check the check digits first
The last two digits of an enterprise number are a check number. You verify it like this:
- Take the first eight digits as one number, in our example
01234567. - Divide by 97 and keep the remainder (
1234567mod 97 is 48). - Subtract that remainder from 97. That gives 49.
The result must equal the last two digits. For 0123.456.749 it does. For 0123.456.794 it does not: the 4 and 9 are swapped, and the number is rejected at once.
function isValidBeEnterpriseNumber(input) {
const digits = input.replace(/\D/g, "").replace(/^BE/i, "");
if (digits.length !== 10) return false;
const base = Number(digits.slice(0, 8));
const check = Number(digits.slice(8));
return 97 - (base % 97) === check;
}
This check is free and catches most typos: swapped digits, a missing digit, a wrong digit. Run it at the front of your form so a bad number never reaches your backend. A valid check number only means the number could be valid. Whether the company exists and is active still has to be looked up.
From enterprise number to VAT number
You build the VAT number by putting BE in front of the ten digits, without dots, spaces or hyphens. That is also the format Peppol and most invoicing systems expect. Put BE 0123.456.749 in an e-invoice and a Peppol access point may reject it.
Two things to watch. Not every business has a VAT number: a company under the small business exemption is in the register but may be unknown in VIES. And it is tempting to assume a Belgian number always starts with 0. That is true for most existing numbers, but a number starting with 1 is not automatically wrong. Validate on the check digits and the length, not on the leading digit.
To verify the VAT number itself with the European Commission, see VAT number validation with VIES.
Looking up a Belgian company
Once the number is valid, you want to know who is behind it: name, address, legal form and status. On kvkbase.nl you can do that in the Belgian lookup tool (Dutch interface): enter an enterprise number or a company name and see the result right away. The Belgian VAT check runs the check digit calculation live while you type.
If you have a mixed list of Belgian and Dutch customers, give each country its own validation rule. A KVK number is eight digits, a Belgian number ten, and the check mechanism differs. Recognise the country by the length and the BE prefix, and then send the number to the right source.
What to do in your own system
- Store the enterprise number as ten digits without dots, and display it with dots.
- Derive the VAT number with
BEin front and store it separately if it goes on invoices. - Validate the check digits in your form, and only look the company up afterwards.
- Store the country next to the number, so a Belgian and a Dutch number never get mixed up.
That prevents most of the errors you would otherwise find later in your books as a rejected invoice or a duplicate customer.
Try it yourself
Enter a Belgian enterprise number in the free tool and see straight away whether it is valid and which company it belongs to. Want to build this into your own webshop or CRM? Create a free account and fetch Dutch and Belgian company data with a single integration.