● Knowledge · 16 Identifiers

GTIN, serial number & check digit: the format rules

Behind every battery passport QR code sits an identifier that follows exact rules: fixed character lengths, a defined character set and a check digit that exposes typing errors. This guide explains the rules, works through the check-digit calculation step by step and shows, on a concrete example, exactly where an invalid serial number fails.

By Grigor Muradyan · Reading time approx. 10 min · Updated: · Not legal advice
8·12·13·14
GTIN lengths
Anything else is not a GTIN
20
characters max.
Serial number under AI 21
82
allowed characters
GS1 CSET 82, no space
mod 10
check digit
Weighting 3/1 from the right
In brief
  • Two numbers, two rule sets. The GTIN identifies the model and consists of 8, 12, 13 or 14 digits. The serial number identifies the individual battery and may be 1 to 20 characters long.
  • The last GTIN digit is computed, not counted. The modulo-10 check digit makes mistyped or transposed digits visible immediately - and it is the most common reason an import gets rejected.
  • The character set is narrower than expected. CSET 82 contains neither spaces nor umlauts. "BPW 2027#Ü01" is not a valid serial number; "BPW-2027-UE01" is.
  • Batteriepasswerk checks both on save - in the database, not just in the form. The same rules therefore apply to the input mask, the CSV import and the API.
01 · Legal frame

Why the format is a legal question

Format rules sound like a detail for the IT department. For the battery identifier they are not: it is the only anchor by which a passport will still be found years later.

Article 77(3) of Regulation (EU) 2023/1542 requires the QR code and the unique identifier to conform to the ISO/IEC 15459 series. That series does not prescribe a specific number - it requires the identifier to come from an accredited issuing agency and to be globally unique. GS1 is such an agency. A serialised GTIN - the combination of the model number and the serial number of the individual battery - therefore satisfies the requirement, as long as three conditions hold:

1
The GTIN is valid

One of the four permitted lengths, digits only, and a correct check digit in the final position.

2
The serial is encodable

At most 20 characters, exclusively from the GS1 character set CSET 82 - otherwise the value cannot travel as AI 21.

3
The pair is unique

The combination of GTIN and serial number must exist exactly once worldwide - otherwise one scan points to two batteries.

The difference between "scannable" and "conformant"

A QR code carrying any URL will scan and display a page - that is not enough. What is required is an identifier from a recognised numbering system that a recycler's system or a market surveillance authority can resolve by machine, without knowing the individual manufacturer's convention. This is precisely where the improvised QR code parts ways with a conformant identifier.

02 · Anatomy

How the identifier sits inside the QR code

The GS1 Digital Link packs both numbers into an ordinary URL. The short numbers between the slashes are application identifiers (AIs): they tell the reading system what the value behind them means.

Anatomy of a GS1 Digital Link as Batteriepasswerk issues it per unit. The GTIN always appears as 14 digits here - GTIN-13 4006381333931 is padded with one leading zero.
ComponentMeaningFormat rule
AI 01GTIN - identifies the model (the trade item)Always 14 digits in a Digital Link - GTIN-8/12/13 padded with leading zeros
AI 21Serial number - identifies the individual battery1-20 characters from CSET 82, case-sensitive
AI 01 + AI 21Serialised GTIN - the identifier under ISO/IEC 15459Combination globally unique

How the QR code itself must be designed - contrast, size, durability - is covered in QR codes on batteries from 2027.

03 · Character lengths

Four permitted GTIN lengths - and no fifth

GS1 issues numbers in exactly four lengths. Which one a company uses depends on the product and the target market - not on its internal numbering habits.

FormatLengthTypical useNote
GTIN-88 digitsVery small items where no longer code fits on the labelRare in the battery sector
GTIN-1212 digitsNorth American UPC formatRelevant when exporting to the US and Canada
GTIN-1313 digitsThe EAN format common in Europe - the default caseGerman prefixes usually start 400-440
GTIN-1414 digitsOuter cases and trade units, leading indicator digitThe required form inside a Digital Link (GS1 DL 1.4.0+)

Inside a Digital Link the GTIN is always 14 digits

All four formats are padded to 14 digits for a Digital Link: GTIN-13 4006381333931 becomes 04006381333931. The check digit does not change, because the weighting starts from the right and a leading zero contributes nothing to the sum. Since version 1.4.0 of the GS1 Digital Link URI syntax (current 1.6.0, March 2025) this is no longer a recommendation but a requirement: new implementations must express the GTIN as 14 digits, and only existing resolvers should keep accepting the shorter legacy forms. In spreadsheets the leading zero only survives if the column is formatted as text.

04 · Check digit

The last digit does arithmetic

The check digit is not a running number but the result of a calculation across all preceding positions. It costs one position and in return catches the two most common capture errors: the mistyped digit and the transposed pair.

GS1 check digit (mod 10)
Digit4006381333931Weight×1×3×1×3×1×3×1×3×1×3×1×3Check digit
Weighted sum
89
Next multiple of ten
90
Expected check digit
9089 = 1
Supplied
1

Valid GTIN - accepted

Digit4006381333932Weight×1×3×1×3×1×3×1×3×1×3×1×3Check digit
Weighted sum
89
Next multiple of ten
90
Expected check digit
9089 = 1
Supplied
2

Check digit does not match - the save is rejected

Each position is weighted alternately 3 and 1, starting to the left of the check digit. The sum is rounded up to the next multiple of ten; the difference is the check digit.

The method is identical for all four GTIN lengths and is called modulo 10 with 3/1 weighting. It detects every single mistyped digit value - a 7 instead of a 1 necessarily changes the weighted sum. For transposed neighbouring digits it works almost always; the one gap is pairs whose values differ by exactly 5 (16 instead of 61, for instance). Ruling that out requires a second check against your own item master.

Check digits are calculated, not incremented

The classic mistake when creating new models: take the previous model's GTIN and add one. The base part is then correct, but the check digit only happens to fit in one case out of ten. New GTINs come from your own GS1 number range, and the check digit is computed by the system.

05 · Character set

CSET 82: 82 characters, no more

Unlike the GTIN, a serial number may contain letters - but not arbitrary ones. The GS1 character set CSET 82 covers exactly 82 characters, and anything outside it cannot travel as an AI 21 value.

GroupCharactersCount
Upper-case lettersA-Z26
Lower-case lettersa-z26
Digits0-910
Special characters! " % & ' ( ) * + , - . / : ; < = > ? _20
Not includedSpace, # $ @ [ \ ] ^ ` { | } ~, umlauts, accents, all non-ASCII characters-

Two details are regularly missed. First, case is significant: BPW-0001a and BPW-0001A are two different serial numbers. Treating them as one in the warehouse creates mix-ups that are formally not mix-ups at all. Second, some permitted characters - /, ?, &, %, + - are also control characters in URLs. They are valid as a serial number but must be escaped inside a Digital Link, otherwise the browser splits the address in the wrong place. As long as the software handles that, it is a non-issue; in a hand-written link it is a real one.

06 · Comparison

Valid and invalid side by side

Both serial numbers below come from the same internal scheme and look equally usable. Only the left one can be encoded as a GS1 identifier - the right one fails on three individual characters.

Serial number: valid and invalid side by side
Accepted
  • Length14 of 20 characters
  • Character set GS1 CSET 82all characters allowed
  • Unique per companyfree
Rejected
  • Length12 of 20 characters
  • Character set GS1 CSET 823 disallowed characters
  • Unique per companyfree
Why the right-hand serial fails (3)
  1. Space. CSET 82 contains no space character - inside a path segment it would only travel escaped (%20) anyway.
  2. The character # is not part of CSET 82. In a URL it also starts the fragment, so a scan would cut the identifier short.
  3. Umlauts and every other non-ASCII character are disallowed - CSET 82 covers only A-Z, a-z, 0-9 and 20 special characters.

The fix: BPW 2027#Ü01 becomes BPW-2027-UE01 - same meaning, encodable character set.

Both serials look usable at first glance. Only the left one can be encoded as a GS1 identifier (AI 21).
07 · Pitfalls

Six errors that show up in real imports

ErrorWhat happensWhat helps
Leading zero disappearsSpreadsheets read the GTIN as a number. 04006381333931 becomes 4006381333931 - or worse, 4.00638E+12.Format the column as text before importing; never store a GTIN as a numeric value.
Umlauts in the serial numberÜ, ä, é or ß are not part of CSET 82 and cannot be encoded as an AI 21 value.Switch to A-Z, a-z, 0-9 and the 20 permitted special characters (Ü → UE).
Spaces as separators"BPW 2027 0001" looks tidy but is not a valid AI 21 value - CSET 82 has no space character.Use a hyphen or a full stop; both are part of the character set.
Internal number too longERP serial numbers often run to 24 or 32 characters. From character 21 the identifier is no longer AI 21 conformant.Define a shortened derivation and verify its uniqueness - do not truncate blindly.
Check digit guessedContinuing a GTIN by hand eventually produces a number whose last digit no longer fits.Always let the system compute the check digit; never carry it forward.
GTIN used twiceTwo models sharing a GTIN make resolution ambiguous - the scan cannot tell which passport to show.Exactly one model per GTIN. Variants need their own GTINs.
08 · In Batteriepasswerk

Where the rules are enforced in our product

Format rules that are only checked in the input form no longer apply to a CSV import or an API call. That is why our validation sits one level deeper - in the database, behind every write path.

GTIN on the model, serial on the passport
The GTIN is entered once on the model and applies to every unit derived from it. The serial number is created per individual passport. Model maintenance stays separate from serialisation - and a thousand passports inherit one correct GTIN instead of repeating it a thousand times.
Data model
Checked on save, not on keystroke
GTIN length and check digit, and serial length and character set, are stored as constraints in the database. A record that violates them is rejected - whether it arrives from the form, an import or the API.
Validation
Uniqueness on two levels
A GTIN belongs to exactly one model across the whole platform - otherwise resolution would be ambiguous. Serial numbers are unique within the company. Together they yield a GTIN/serial pair that exists only once.
Uniqueness
Plain language instead of error codes
When a value is rejected, the dialog says why: which lengths are permitted, that the check digit does not match, or which characters the GS1 character set allows. The message names the rule, not the row number.
Error messages

Without a GTIN there is a fallback link - but no GS1 identifier

Models without a GTIN get a fallback address pointing at the internal passport ID. The QR code scans and the passport is publicly reachable - but that is not enough for Article 77(3), because the identifier then comes from no accredited numbering system. Shipping a conformant passport requires a GS1 number on the model. The QR page flags this during generation so the gap does not slip through to production.

How one model turns into thousands of serialised passports is covered in Creating a battery passport. Which data fields are mandatory beyond that is covered in What data goes into the battery passport.

09 · FAQ

Frequent questions on GTIN and serial numbers

How many digits does a GTIN have?
GS1 defines four lengths: GTIN-8 (8 digits, for very small items), GTIN-12 (12, the North American UPC format), GTIN-13 (13, the EAN format common in Europe) and GTIN-14 (14, for outer cases and trade units). There are no other lengths - an 11- or 15-digit number is not a GTIN, however plausible it looks. In all four cases the last digit is the check digit.
How do you calculate the GS1 check digit?
With the modulo-10 method: every position to the left of the check digit is weighted alternately 3 and 1, starting with 3 immediately left of the check digit. The weighted values are added up, the sum is rounded up to the next multiple of ten, and the difference is the check digit. Example GTIN-13 4006381333931: weighted sum 89, next multiple of ten 90, check digit 1. The method is identical for all GTIN lengths.
Which characters are allowed in a GS1 serial number?
Application identifier AI 21 (serial number) allows 1 to 20 characters from the GS1 character set CSET 82: the 26 upper-case and 26 lower-case letters, the ten digits and 20 special characters (! " % & ' ( ) * + , - . / : ; < = > ? _). Spaces, umlauts, accented letters, the hash sign # and every other character outside those 82 are excluded. Case is significant: BPW-0001a and BPW-0001A are two different serial numbers.
Why is a serial number limited to 20 characters?
The limit comes from the GS1 General Specifications for AI 21 and applies whether the number sits in a barcode, a Data Matrix code or a Digital Link. It keeps the same identifier encodable across every GS1 carrier. Companies running longer internal numbers need a shortened, still unique derivation for the passport - truncating without a uniqueness check is the most common mistake here.
What happens if the GTIN or serial number is not conformant?
The QR code often still scans, but the identifier behind it is no longer an ISO/IEC 15459 conformant one - and that is exactly what Article 77(3) of the EU Battery Regulation requires. In practice there is a second effect: trading partners, market surveillance authorities and recyclers resolve the number by machine. A GTIN with a wrong check digit is rejected by their systems before anyone gets to see the passport at all.
10 · Sources

Sources & further reading

Formats that pass on the first attempt

GTIN and serial number are validated on save - not first discovered at the scan

Batteriepasswerk validates length, character set and check digit in the database and turns them into a GS1 Digital Link QR code per unit - conformant to EU 2023/1542 and DIN DKE SPEC 99100, hosted in the EU.