snaptxt.app
Blog
Validators3 min readNovember 3, 2026

How to Generate a Test NZBN for Software Testing

Testing a form that captures a New Zealand Business Number means you need a valid NZBN to type in — and, as with any registry identifier, the right choice for testing is a well-formed number that isn't tied to a real company. Here's how the NZBN is built and how to generate dummy ones for QA.

The NZBN is a GS1 identifier

An NZBN is a 13-digit number, and it's not arbitrary — it's a GS1 Global Location Number. New Zealand businesses share the country prefix 9429, so every NZBN starts with those four digits. The final digit is an EAN-13 check digit:

  1. Take the first 12 digits.
  2. Apply alternating weights of 1 and 3 across the positions.
  3. Sum the products.
  4. The 13th digit is whatever makes that total a multiple of 10.

That's the same checksum scheme used on retail barcodes, which is why a plain random 13-digit number almost never validates — the check digit has to be computed, not guessed.

Generating a valid test NZBN

A generator starts with the 9429 prefix, fills the middle digits, then computes the EAN-13 check digit so the number passes by construction. The output has the right prefix and a correct checksum — indistinguishable from a real NZBN to a validator, while registered to no one.

Format vs. registration

Passing the checksum tells you the number is well-formed. It does not mean it's a registered business on the NZBN Register — that's a live lookup, a separate concern from format validation. Use generated NZBNs for form testing, QA fixtures, demos, and dev data; use the register only where your application genuinely needs to confirm a real entity.

Try it

The New Zealand Business Number Generator & Validator generates valid-format test NZBNs (correct 9429 prefix and GS1 check digit) and validates any NZBN you paste, entirely in your browser with nothing sent to a server. For related NZ identifiers, see the IRD number generator and the NZ bank account validator.

guidenew-zealanddummy-datatesting
H

Hanuman Singh · built snaptxt.app · hanumansingh.dev