Bulk GTIN validation modes

The bulk validator on the check digit calculator returns a verdict for every line of a pasted column. This guide explains how that engine reads a line: the order of operations, the two reading modes, the four statuses, the corrected column and the row cap. Every figure below is computed at build time by the same code that runs in your browser, on a fictional list and on the published vectors the engine is tested against; nothing is typed in.

The short version: a column that already carries its check digits stays in auto mode; a column still waiting for its check digits needs data-only mode. In the tool the switch reads “Numbers include their check digit (validate)” and “Data only — append the check digit”; this page uses the engine's names, auto and data-only. The rest is why the distinction exists and what happens when the mode does not match the column.

What happens to every line, in order

The engine processes pasted text in a fixed order:

  1. Split and trim. Lines are split at any line ending and trimmed; blank lines are skipped and never counted.
  2. Strip separators. Spaces and hyphens are removed; the line as pasted stays the row's input, the digits its cleaned form.
  3. Enforce digits only. A separator-only line reports “No digits on this line.”; a line with other characters reports “Contains characters other than digits, spaces, and hyphens.”
  4. Read the digit count by mode. Auto verifies 8, 12, 13 and 14 digits as complete numbers and completes 7 and 11; data-only completes 7, 11, 12 and 13. Any other count is not usable.
  5. Verify or compute, never repair. A verified line keeps its digits and its status says whether the final digit matched; a completed line gets the computed digit appended and is labeled completed, not valid.
  6. Report. Each row carries its family, status, expected check digit, complete number when one exists and a one-sentence note; the report adds four counts, the non-blank total and whether the cap was hit.

The four lengths are the GTIN families this engine covers — the numbers inside EAN-8, UPC-A, EAN-13 and ITF-14 symbols — sharing one mod-10 computation, walked through in how GTIN check digits are computed.

Auto mode: the complete-number reading wins

A 12-digit line could be a complete GTIN-12 or the first twelve digits of a GTIN-13 awaiting its check digit; a 13-digit line is ambiguous in the same way between a complete GTIN-13 and GTIN-14 data. The engine resolves this openly: in auto mode the complete-number reading wins, because the tool is a validator first. Seven- and eleven-digit lines have no complete reading, so they are the only lines auto mode completes.

The fictional list below shows both readings side by side. Rows 1 to 3 come from the fictional data digits 730112345678 and the engine's own check digit: the complete number, the same number with its last digit moved by one, and the complete number pasted with a space and a hyphen inside it. Rows 4 and 5 are seven and eleven fictional data digits. Rows 6 and 7 are twelve and thirteen data digits with no check digit — the trap. After a skipped blank line come a five-digit fragment and a value pasted in scientific notation.

Per-row verdicts for the fictional list in both modes.
# Input Auto Data-only
1 7301123456785 GTIN-13 valid → 7301123456785 GTIN-14 completed → 73011234567852
2 7301123456786 GTIN-13 wrong-check-digit → 7301123456785 GTIN-14 completed → 73011234567869
3 730 1123-456785 GTIN-13 valid → 7301123456785 GTIN-14 completed → 73011234567852
4 2001234 GTIN-8 completed → 20012342 GTIN-8 completed → 20012342
5 04210987654 GTIN-12 completed → 042109876544 GTIN-12 completed → 042109876544
6 730112345678 GTIN-12 wrong-check-digit → 730112345675 GTIN-13 completed → 7301123456785
7 1730112345678 GTIN-13 wrong-check-digit → 1730112345674 GTIN-14 completed → 17301123456782
8 12345 invalid invalid
9 7.30112E+12 invalid invalid

Auto mode, as the tool prints it:

9 numbers checked: 2 valid · 3 wrong check digit · 2 completed · 2 not usable.

Row 3 cleaned to the same digits as row 1, so both verify. Row 2's note reads “Check digit should be 5, not 6.” — the never-repair rule in one sentence: the expected digit is named, the complete number sits in its own column, and the input is left as pasted. Rows 6 and 7 are the trap: each was read as a complete number and its last data digit tested as a check digit it never was. Both verdicts answer the question auto mode asks — is this a complete number with a fitting final digit? — not the question the person pasting meant. The calculator's single-number form names that road not taken; for a whole column, the alternative is the second mode.

Data-only mode: every line is data digits

Switch the mode and the same text reads differently, as the last column shows: 7, 11, 12 and 13 digits become GTIN-8, GTIN-12, GTIN-13 and GTIN-14 data, each gets a computed check digit appended, and every successful row is labeled completed — nothing is verified, because the mode has said there is no check digit to verify.

Data-only mode:

9 numbers checked: 0 valid · 0 wrong check digit · 7 completed · 2 not usable.

Row 6 now completes to the number in row 1, so the trap is resolved. But row 2, the corrupted number, also succeeds: read as thirteen data digits, its wrong final digit is treated as data and a fourteenth digit appended, giving a structurally valid GTIN-14 nobody wanted. Data-only mode cannot catch a wrong check digit because it never looks for one, which is why the mode must match the column. Rows 8 and 9 stay not usable, and the note now names the lengths this mode accepts: “5 digits — data digits without a check digit come as 7, 11, 12, or 13.”

The four statuses and the corrected column

The tool shows the engine's four statuses as “Check digit correct” (valid), “Wrong check digit” (wrong-check-digit), “Check digit appended” (completed), and “Not usable” (invalid). Only the first says anything was verified; completed means a digit was computed, not checked; not usable means no number was invented.

The corrected column is where never-repair becomes visible: the engine reports the expected digit and puts the data digits plus that digit in a separate field, shown beside the input. A mismatch often means one of the other digits was mistyped, so the decision stays with whoever owns the data. Copying the column preserves row order; unusable rows become blank lines so it pastes back beside the original.

The published vectors under both readings

Both modes on the published reference values the methodology page cites and the engine's tests use:

Cited inputs under both modes.
Input (cited) Source Auto Data-only
400638133393 EAN-13 walkthrough data GTIN-12 wrong-check-digit → 400638133390 GTIN-13 completed → 4006381333931
73513537 EAN-8 example GTIN-8 valid → 73513537 invalid
03600029145 UPC-A walkthrough data GTIN-12 completed → 036000291452 GTIN-12 completed → 036000291452
09506000134352 GS1’s example GTIN GTIN-14 valid → 09506000134352 invalid
978-0-306-40615-7 canonical ISBN-13 GTIN-13 valid → 9780306406157 GTIN-14 completed → 97803064061576
0-306-40615-2 its ISBN-10 form invalid invalid
0-8044-2957-X X-check ISBN example invalid invalid

The twelve walkthrough digits show the ambiguity most sharply. Auto mode reads them as a complete GTIN-12, finds that the final digit does not fit the eleven before it, and offers the data digits with the expected digit; data-only mode reads them as GTIN-13 data and appends the check digit, giving the EAN-13 the walkthrough is about. The eight- and fourteen-digit vectors verify in auto mode and are not usable in data-only mode — “8 digits — data digits without a check digit come as 7, 11, 12, or 13.” — while the eleven UPC-A data digits come out identical in both, as every 7- and 11-digit line does. The ISBN-13 verifies as a GTIN-13 once its hyphens are stripped, because its final digit is an EAN-13 check digit; data-only mode extends it to fourteen digits without complaint. The ISBN-10 forms are not usable in either mode: ten characters is not a GTIN length and X is not a digit. Their mod-11 check character belongs to the ISBN barcode tool and the ISBN conversion guide.

The row cap

The engine processes at most 500 non-blank lines per pass and says so when the input was longer, carrying the non-blank total and a truncation flag in its report. Fed 503 copies of the fictional complete number, it returns 500 rows, sets the flag, and the tool prints:

500 numbers checked: 500 valid · 0 wrong check digit · 0 completed · 0 not usable. Only the first 500 of 503 non-blank lines were processed.

Blank lines do not count: the fictional list above had 10 physical lines and 9 non-blank ones. Nothing beyond the cap is validated.

Where the validator stops

  • Structure, not registration. A valid status means the digits are internally consistent under the mod-10 rule. Validating a number does not allocate or license the GTIN inside it — that is GS1's role; see Do I need a GS1 barcode?
  • Mod-10 only. ISBN-10 check characters, and anything that is not GTIN-8, -12, -13 or -14 data, fall outside this engine, which says so rather than guessing.
  • No bars. The validator renders nothing. The bulk label tool runs each row through the same structural and check-digit validation before rendering; as the methodology page states, bulk PDF sheets are the deliberate exception whose assembled PDF is not individually decoded.

Bulk validation FAQ

Why do most rows of my 12-digit column say wrong check digit?

In auto mode a 12-digit line is read as a complete GTIN-12, because validating is the tool’s first job. If your column holds the first twelve digits of EAN-13 numbers, the final digit is being tested as a check digit it never was. Switch to data-only mode: every line is read as data digits and the check digit is computed and appended.

Does the validator ever change the numbers I pasted?

No. The input is kept as pasted; a wrong check digit is reported with the expected digit, and the corrected number goes in a separate column. Copying that column preserves row order and leaves unusable rows blank.

What is the difference between valid and completed?

Valid means a complete number was verified: its final digit matched the recomputation. Completed means data digits had a check digit computed and appended; nothing was verified, because there was nothing to verify.

Can data-only mode catch a typo?

Not in the check digit. Every digit on the line is treated as data, so a complete number with a wrong final digit is simply extended by one digit — the corrupted line in the fictional list became 73011234567869. For a column that already carries check digits, use auto mode.

How many lines can I validate at once?

500 non-blank lines per pass. Longer input is cut off openly: the report says how many non-blank lines it saw and that only the first 500 were processed. Blank lines do not count; paste longer files in batches.

If every row is valid, are my GTINs registered?

No. Valid means structurally valid: the digits are consistent under the mod-10 rule, and any digit string whose final digit fits will pass. Validating a number does not allocate or license the GTIN inside it; that is GS1’s role — see “Do I need a GS1 barcode?”

Math, not optics: this validator checks digits and their mod-10 consistency. Whether a printed symbol made from them scans depends on contrast, size, substrate and preserved quiet zones, which no browser check can certify — test a printed sample with your own scanner before production use. Everything runs locally in your browser. See the methodology page for how the verification layer is tested, and the guides index for the rest of this series.