DevTools Logo

South Africa VAT Number Generator

South Africa VAT Number Generator

Generate 10-digit SARS VAT numbers that start with 4 and carry a Luhn check digit — synthetic test data only

Runs in your browser

For Development & Testing Purposes Only - Synthetic Mock Data

Settings

1 value

Generates one value with a valid checksum. Press ⌘/Ctrl+Enter for a fresh one.

Generated value

No value yet

Set options, then press Generate.

Generated values are valid in shape but randomized (Test Data).

Legal Disclaimer: Generated data is for software testing and validation purposes only (e.g. verifying input masks, form validation, or database seeding). It is randomly generated and not taken from any real record, but a random value can coincidentally match a real, issued number, so never use it in real applications, payments, KYC or official forms. Using it to impersonate real people or for any fraudulent activity is illegal. DevTools accepts no liability for how generated data is used.

    Examples

    Valid VAT number

    Input
    4023456785
    Output
    Valid — 10 digits starting with 4, Luhn check digit 5

    The final digit is what the Luhn calculation over the first nine digits produces.

    Wrong leading digit

    Input
    5023456785
    Output
    Invalid — South African VAT numbers start with 4; this starts with 5

    The length and checksum are unchanged, so the prefix rule is the only failure.

    Too short

    Input
    402345678
    Output
    Invalid — a South African VAT number has 10 digits; found 9

    Length is checked before the prefix and checksum, so truncated fixtures fail early.

    About this tool

    The South Africa VAT Number Generator produces one 10-digit SARS VAT number starting with 4 and ending in a Luhn check digit. Unlike the National ID, there is no birth date or flag embedded in the number, so validation is length, leading digit and checksum.

    The Luhn rule is community-documented rather than officially published by SARS, so treat it as a widely used convention. The validator recomputes the final digit and reports the expected value, and it names the leading digit when a pasted number starts with anything other than 4.

    These values are synthetic test data for QA and development, never for real tax registrations, filings, or vendor verification, and DevTools accepts no liability for how generated data is used. Everything runs locally in your browser.

    What this tool does not do

    • The Luhn check digit is community-documented and not an official SARS algorithm.
    • Validation cannot confirm that the number is registered or that it belongs to the vendor.
    • Only the 10-digit VAT number is covered; the 13-digit ID number has its own tool.
    • A generated value looks identical to a real number, so it must stay in test environments.

    How to use this tool

    1. Choose the SA VAT option

      The tool is pinned to the 10-digit South African VAT number with the Luhn check digit.

    2. Generate a value

      Click Generate to create one number starting with 4 and ending in a valid Luhn digit.

    3. Validate or copy

      Switch to Validate to recompute the check digit, or copy the result and download it as .txt.

    Use cases

    Supplier and invoicing fixtures

    Fill South African vendor records with VAT numbers that pass the local checksum.

    Checksum regression tests

    Compare your Luhn implementation against 4023456785 and a variant starting with 5.

    Length enforcement

    Test 9-digit and 11-digit inputs to confirm the form enforces exactly 10.

    South African VAT rules

    PartRule
    Length10 digits
    First digit4
    Digit 10Luhn check digit
    StatusLuhn rule community-documented, not officially published
    ValidationLength, leading 4 and checksum

    Spaces are ignored before validation, so grouped input still checks.

    Common mistakes

    Mistake:Treating the Luhn check as official

    Fix:SARS publishes no check digit, so keep the rule configurable if your integration relies on it.

    Mistake:Confusing the VAT number with the income tax number

    Fix:The VAT number is 10 digits starting with 4; other SARS identifiers have different shapes.

    Mistake:Accepting a number that only has the right length

    Fix:The leading 4 and the Luhn digit are both required.

    Frequently asked questions

    Are these real SARS VAT numbers?

    No. They are synthetic fixtures for QA and development, never for real tax registrations, filings, or vendor verification; DevTools accepts no liability for how generated data is used.

    Does a South African VAT number have a check digit?

    The 10th digit follows a Luhn check, but that rule is community-documented rather than officially published by SARS, so treat it as a widely used convention.

    Why must a VAT number start with 4?

    SARS issues VAT numbers starting with 4, and the validator names the leading digit when a pasted value starts with anything else.

    Is the VAT number the same as the income tax number?

    No. The VAT number is 10 digits starting with 4; other SARS identifiers such as the income tax number have different shapes.

    Does a passing value mean the vendor is registered?

    No. Validation only confirms the length, the leading 4 and the checksum; it cannot confirm that the number is registered or belongs to the vendor.

    References & standards