WorkflowRegulatory Affairs

Learn · inside the 2D code

The Data Matrix on pharmaceutical packaging: every field, checked

European law fixes what the Data Matrix on pharmaceutical packaging must contain, and fixes its print quality only by a presumption of conformity — so the grade a company insists on is a decision it has to make and defend. This guide sets out every field, what sits beside it, and the four things a proofreader can check on a file before any press, with Labeling & Artwork Proofreading doing the decoding.

Updated · 13 min read

See one case, screen by screen →
Watch with transcript →

The Data Matrix on pharmaceutical packaging is the small square two-dimensional barcode that carries a European pack's unique identifier: the product code, a serial number unique to that pack, the batch number and the expiry date, with a national number where a member state asks for one. It is hard to check because almost none of it is legible to the person approving the artwork, and because the rules that govern it are split — the contents are fixed by regulation, while the print quality is fixed only by a presumption of conformity that leaves the company to choose, and defend, its own threshold. Botminds' Labeling & Artwork Proofreading decodes the code on the print-ready file, checks the product code against the item master and its check digits, and reports what it found beside every other check on the carton.

What follows separates three things that are routinely run together: what the law requires, what the coding convention does to carry it, and what a company has decided for itself. The worked example is a fictional sample company, Veltara Therapeutics, and its German 30-tablet carton; the regulatory sources are linked where they appear.

Three published numbers behind every European code area

1.5

the printing quality score under ISO/IEC 15415 that gives a presumption of conformity — not a minimum

1year

after the pack’s expiry date, or five years after release, whichever is longer, that the code must stay accurately readable

5

human-readable headers the Commission names: PC, SN, Lot, EXP and NN

All three from the European Commission's questions and answers on safety features for medicinal products for human use, Version 22 (published 10 July 2026), questions 2.4 and 2.22. The document itself states that its views “are not a formal interpretation of Union law, nor are legally binding”.Source: European Commission, Safety features Q&A, Version 22

What does the Data Matrix on a medicine pack contain?

It carries the unique identifier for that individual pack, and nothing a patient needs to read. The Commission's Q&A refers to the product code as "one of the data elements of the unique identifier", whose composition and order are laid down in Article 4(b) of Commission Delegated Regulation (EU) 2016/161. In practice those elements are the product code, the serial number, the batch number and the expiry date, with a national reimbursement or other national number where a member state requires it.

One widely believed thing about the contents is wrong, and the Q&A corrects it directly. Asked whether the batch number and expiry date must be printed in human-readable form next to the two-dimensional barcode, the Commission answers that they "are mandatory components of the labelling of all medicinal products – regardless of whether they bear the safety features – and should be printed on the packaging in accordance with Article 54(h) and (m) of Directive 2001/83/EC. There is no obligation to place batch number and expiry date adjacent to the two dimensional barcode." They are particulars in their own right, and they travel with the pack whether or not it carries safety features.

The order of the elements is not fixed either. Manufacturers "can choose the order of the data elements provided that all data elements required by national legislation and Article 4(b) (for the 2D Data Matrix) or Article 7 (for the human-readable format) are present". That is a useful piece of knowledge when a file arrives with the fields in a different sequence from the last version: the sequence is not the finding, the absence of a field is.

The four data elements, and the national number that may join them

The clearest way to read a code area on an artwork is to lay the printed block out beside what each line means and what it can be checked against. Two of the five lines below are variable data applied on the packaging line, which means an artwork proof can only check that they have a place to print — not what they will say.

One carton’s code block, line by line, and what each line can be checked against

PC

Product code · 04150123456782

On a German pack this is the number built from the national pharmacy number PZN 12345678. The last digit is a check digit, and it computes: a reader can recompute it from the thirteen digits before it.

SN

Serial number · unique to this pack

Applied on the packaging line, not on the artwork. On a print-ready file the check is that the field exists, is in the right place and has room to print.

Lot

Batch number · applied at packing

A labelling particular in its own right under Article 54, not a component of the human-readable code — and it need not sit beside the barcode.

EXP

Expiry date · applied at packing

Also a labelling particular in its own right, and relevant information for the patient after the pack is opened.

NN

National number · PZN 12345678

Printed in human-readable form only where the member state requires it and it is not printed elsewhere on the pack. In Germany it also carries its own linear code.

The fictional sample company's German 30-tablet carton. The product code and the national number are fixed for this pack and can be checked on the file; the serial number, batch number and expiry date are applied at packing, so on an artwork the check is that each has a field, a position and room.Source: European Commission, Safety features Q&A, Version 22

The national line is the one that moves between markets. The Commission's position is that "the national reimbursement number or other national number should be printed in human readable format only if required by the national competent authorities of the relevant Member State and not printed elsewhere on the packaging. It should be printed adjacent to the two-dimensional barcode if the dimensions of the packaging allow it, unless national legislation provides otherwise." Germany is the standard example: the Commission's own packaging-information guideline records in its country annex that "the 'Pharmazentralnummer' (PZN), has to be indicated on the labelling".

Where a national requirement exists, it usually has a home: the boxed area reserved for one member state's own information. "The information specific to a Member State should be accommodated on the label in a single boxed area (the so-called 'blue box'), to appear on one side of the pack." Each box is in that state's official language or languages and names the state, and the guideline recommends the box sit in the same place for every member state. On a multi-market pack the guideline even describes the practical workaround — a blank box printed on the pack onto which a sticker with the right state's information is affixed.

What print quality does a Data Matrix need?

Enough that it still reads at the end of the pack's life — and the regulation expresses that as an outcome, not as a grade. The Commission's answer to the question of whether a printing quality of 1.5 is mandatory is worth reading in full: "No. Manufacturers are required to use a printing quality which ensures the accurate readability of the Data Matrix throughout the supply chain until at least one year after the expiry date of the pack or five years after the pack has been released for sale or distribution in accordance with Article 51(3) of Directive 2001/83/EC, whichever is the longer period. The use of a printing quality of 1.5 or higher gives a presumption of conformity" — and, the answer continues, if a lower quality is used, manufacturers may be asked to prove that the readability requirement is met.

That structure matters more than the number. The obligation is readability over a defined period; 1.5 is a safe harbour that relieves you of proving it. A company printing above 1.5 is not meeting a minimum, it is buying out of an evidentiary burden. A company printing below it has not broken a rule, it has taken on the job of demonstrating something.

Grade letters, the 1.5 score, and what neither of them promises

Most companies write their own code-quality requirement as a letter — the sample company's setting is grade B or better to ISO/IEC 15415 — while the Commission's presumption is written as a number on the same standard's scale. Both refer to a standard that is not a public document, and the equivalence between the two notations lives inside it. The practical consequence is that a specification should say, in its own words, exactly what it requires and against what measurement method, because neither "grade B" nor "1.5" is self-explanatory to a reader who does not hold the standard.

Four statements about code quality, and what each one actually commits you to

The statementWhere it comes fromWhat it commits you to
The code must stay accurately readable throughout the supply chain until at least one year after expiry, or five years after release, whichever is longerThe Commission's reading of the delegated regulationAn outcome over time. This is the obligation; everything else is a way of evidencing it.
A printing quality of 1.5 or higher gives a presumption of conformityThe Commission's safety features Q&A, question 2.4Nothing, unless you choose it. Printing at or above it means you are presumed to have met the obligation without proving it.
Below 1.5, manufacturers may be asked to prove that the requirement is metThe same answerAn evidence burden, not a breach. The question becomes what you measured and on what sample.
Grade B or better to ISO/IEC 15415The sample company's own setting, not any regulatorA stricter internal threshold than the presumption. It is a decision the company makes, versions and defends — and it should be written down as such.
These views are not a formal interpretation of Union law, nor are legally bindingThe Q&A's own disclaimer, on its first pageA reminder that the numbers above are the Commission's technical guidance on the regulation, not the regulation.
The first three rows are quoted or paraphrased from the Commission's Q&A, Version 22; the fourth is the fictional sample company's setting in Labeling & Artwork Proofreading, shown to make the distinction visible.

There is a second limit worth stating plainly, because it sets the boundary of what any artwork check can claim. Print quality is a property of a printed pack: of ink, substrate, press, and the scanner geometry used to measure it. It cannot be assessed on a print-ready file at all. What the file can tell you is whether the code will have a fair chance — its contents, its size, its clear area, its contrast and what sits around it.

Where the code goes, and what has to sit beside it

Two placement rules come from the Q&A and one from the geometry of the pack. On whether the human-readable elements must sit next to the barcode, the Commission's answer is short: "Yes, whenever the dimensions of the packaging allow it." Where the pack will not allow it, the product code and serial number should still share a surface where space allows, so that a pack can be decommissioned by hand, and the other elements should be placed as close to them as possible.

On the very small pack, there is one exemption and it is narrower than it is often read. Asked whether packs whose two longest dimensions add up to 10 cm or less are exempt from bearing the two-dimensional barcode, the Commission answers: "No, Article 7(2) only provides for an exemption from bearing the unique identifier in human readable format. The unique identifier in machine-readable format – the 2D barcode – is still required." The dots and the human-readable block are two different obligations, and only one of them bends on a small pack.

The third rule is about neighbours. Where a one-dimensional barcode stays on the pack alongside the two-dimensional one, that is allowed "provided that the presence of both barcodes does not negatively impact the legibility of the outer packaging", and the Commission adds that to avoid incorrect scanning by end users the barcodes should, if possible, not be placed in proximity to each other, preferably on different sides of the pack. On a German carton that matters directly, because the national pharmacy number carries its own linear code beside the Data Matrix.

What are PC, SN, Lot and EXP on a medicine pack?

They are the headers that tell a human eye which number is which. The Commission's position is that they should follow the product information template: "the product code, serial number and national reimbursement number in the human readable code should be preceded by the letters 'PC', 'SN' and 'NN'. Batch number and expiry date should follow the abbreviations laid out in Appendix IV of the QRD-template."

Their placement is more relaxed than their presence. Headers "are not required to be placed adjacent/on the same line as the respective data element. Headers can be placed in any position which allows the unequivocal identification of the human-readable data element." That is an artwork permission, and on a crowded panel it is often the one that saves a layout.

One more detail belongs in an artwork brief, and it is about the characters rather than the headers. To reduce false alerts caused by scanner misconfiguration, the Commission strongly encourages that serial and batch numbers contain only uppercase letters, avoid special characters such as hyphens and question marks, and avoid the letters "I", "O", "Y" and "Z". That is a specification for the data, not for the file — but it is the kind of thing that reaches artwork as a sample string and should not be quietly "tidied" by whoever sets the panel.

The code decoded on the file, beside every other check

The carton checks panel for the German 30-tablet carton: the Data Matrix decoded with its product code, the check digit validated, the serial, batch and expiry fields present, the grade recorded, the linear pharmacy code graded, the Braille line, the smallest type size with its x-height, the mandatory particulars on their panels, and the anti-tamper and code areas clear.
On the fictional sample company's German carton the code decodes to product code 04150123456782 — the number built from PZN 12345678 — with a valid check digit and the serial, batch and expiry fields present. Six of six checks passed on that version.

The United States asks a different question of the same pack

A US carton for the same product answers a different regulation with a different carrier. The codified barcode requirement is about a linear code: 21 CFR 201.25(c) asks for a barcode carrying at least the National Drug Code, in a linear symbol built to the EAN/UCC or HIBCC standards or to another format the relevant FDA Center Director has approved, with enough blank space around it to scan.

The two-dimensional code arrives in US supply-chain law through a different door. The FDA's 2026 final rule on the NDC format describes it in a footnote: a product identifier is "a standardized graphic that includes the product's NDC and serial number (collectively, the 'standardized numerical identifier'), lot number, and expiration date ... For packages of product, the data carrier is a 2D data matrix barcode". Same square on the pack; a different legal question asked of it.

One carton, two regimes: what each jurisdiction asks of the code area

European UnionUnited States
What the 2D code carries

European Union: The unique identifier: product code, serial number, batch number and expiry date, plus a national number where a member state requires one.

United States: The product identifier: the NDC and serial number together, plus lot number and expiration date.

What the law says about print quality

European Union: Accurate readability until at least a year after expiry, or five years after release; 1.5 gives a presumption of conformity.

United States: The codified barcode rule is about the linear code and the standards it must meet, not a quality score.

The linear code

European Union: May stay, provided it does not harm the legibility of the pack; preferably not next to the 2D code.

United States: Required today — the NDC in a linear barcode meeting a named standard or one the relevant Center Director has approved. The 2026 rule will also permit other data carriers.

The human-readable block

European Union: Adjacent to the 2D code wherever the pack allows; headers PC, SN and NN, with batch and expiry following the template abbreviations.

United States: The NDC appears on the label in its own right; the rule does not prescribe the same header scheme.

What is changing

European Union: Stable; the Q&A is revised but the structure has held since the delegated regulation applied.

United States: The NDC format itself is being revised, with a long transition — a portfolio-wide artwork change in slow motion.

Left column from the Commission's safety features Q&A, Version 22; right column from 21 CFR 201.25 and the FDA's 2026 final rule on the NDC format and barcode requirements. The last row is the reason US packs need a plan rather than a reaction.

That last row is the one to put in a roadmap rather than in a proofreading procedure. The 12-digit NDC format and the dates behind it works through what changes on every US pack and when.

What a proofreader can check before the press, and what only a verifier can

Four things about a code can be settled on the file, and they are worth separating from the two that cannot. On the file: the contents decode and match what this pack should carry; the product code matches the item master and its check digit computes; the human-readable headers and fields are present, correctly labelled and placed where the Q&A expects them; and the code area has its clear space, its contrast and nothing printed over it.

Not on the file: the printed quality score, which needs a printed sample and a measuring instrument, and the behaviour of the code once the pack is folded, glued, sealed with a tamper-evident device or scanned by a pharmacist's handheld. The Commission's guidance touches that last point too — a transparent anti-tampering sticker may go over the Data Matrix provided it does not impair readability, but not over the human-readable batch number and expiry date if opening the pack would damage them, because those remain relevant to the patient after opening.

The solution sits firmly on the first list. Its barcode and Braille reader decodes the Data Matrix and the linear codes on the print-ready file and on the printer's proof, checks the product code against the item master and the check digits, and refuses to pass a code below the grade the company has set. It does not run a verifier over printed stock, and a chain that believes it does has a measurement nobody is taking.

The code area on an artwork: what to check before the file goes back

  1. The code decodes, and to the right product

    Not “a code is present”. Decode it, and compare the product code with the item master entry for this pack.

  2. The check digit computes

    A transposed digit in a product code produces a plausible-looking number that fails arithmetic. This is the cheapest check on the page.

  3. Every field has a place, including the variable ones

    Serial, batch and expiry are applied at packing. The artwork owes them a position, room and a legible setting — not a value.

  4. Headers present and correctly lettered

    PC, SN and NN before the product code, serial number and national number; batch and expiry following the template abbreviations.

  5. The human-readable block adjacent to the code, if the pack allows

    And where it does not, the product code and serial number at least on the same surface, so a pack can be decommissioned by hand.

  6. Clear space, contrast and nothing on top

    No varnish, no overprint, no graphic intruding. Enough contrast to scan — the Q&A accepts a white-on-black or rectangular code if it meets the technical requirements — and away from other codes where possible.

  7. The national number, where and only where it is required

    Printed in human-readable form only if the member state requires it and it is not printed elsewhere — and in Germany, with its own linear code.

  8. Perforations, folds and curvature

    A code at a point of label separation or on a sharply curved surface will scan badly however well it prints. Move it on the file, not at the press.

Items one to seven follow the Commission's Q&A and the packaging-information guideline linked above; the last follows the FDA's own placement advice for barcodes, which warns about the point of label separation and extreme curvature.

The checks that fail late, and how to move them earlier

A code problem found at the press check is expensive in a particular way: it is found by the people least able to fix it, at the moment the pack is most expensive to change. The FDA's design guidance describes the failure mode from the scanning end — "we recommend locating the linear barcode away from other barcodes and ensuring there is adequate contrast between the background color and the barcode to allow for proper scanning (e.g., print the barcode in dark ink on a white background)", and goes on to warn about placement at a perforation and about extreme curvature distorting a linear code.

Every one of those is a decision made on the file. Contrast, neighbours, position relative to a fold or a perforation, and the curvature of the container the label will wrap — all of them are knowable the day the artwork is drawn, and all of them are routinely discovered at a press check because nothing earlier in the chain looked at the code at all.

Moving them earlier is mostly a matter of deciding that the code is text. In the solution the code settings sit beside the severity rules and the type-size minimums as the company's own versioned configuration — the Data Matrix grade and the identifiers carried, and for Germany the national number and its linear code on the carton — and the check runs on every artwork version, not on a sample. The grade the company chose is visible on the setting, which is the right place for a decision that no regulator made.

The code rules as the company’s own settings, versioned

The settings screen showing the company's own rules: severity grades for different kinds of difference, what is ignored and never ignored, type-size minimums by market, the Data Matrix grade and identifiers carried, the German national number and its linear code, the Braille standard, and the named approvers.
Every line here is the company's decision, saved as a new version that takes effect on the next proof. Signed proofs keep the rules they were run under, which is what lets an auditor read an old report and know what it meant.

Every code check across a change wave, with the rule behind it

The checks screen listing every check run across the change wave with its rule and its source, grouped by kind — code, Braille, type size and mandatory particulars — and the three checks that did not pass.
A check that cites the rule it came from can be argued with. A pass or fail with no rule attached is a verdict nobody downstream can reopen.

The honest summary of this page is that the code area rewards precision about who required what. The contents are the regulation's. The grade is yours. The print quality is the press's, and nobody can read it off a file. Knowing which is which is most of what separates a code check that holds up from one that merely happened. For the part of the same carton that is equally unreadable by eye, see the Braille on the pack; the solution itself is at Labeling & Artwork Proofreading.

Questions people ask

What is the unique identifier on a medicine pack?

It is the data set that identifies one individual pack, carried in the two-dimensional barcode: a product code, a serial number unique to that pack, the batch number and the expiry date, with a national reimbursement or other national number where a member state requires one. Its composition and order are laid down in Article 4(b) of Commission Delegated Regulation (EU) 2016/161, and manufacturers may choose the order provided every required element is present.

Does a small pack need a Data Matrix?

Yes. The exemption for packs whose two longest dimensions add up to 10 cm or less applies only to carrying the unique identifier in human-readable format. The Commission is explicit that the machine-readable form — the 2D barcode — is still required. Small packs may also, voluntarily, carry the human-readable code if they can fit it.

Do the human-readable numbers have to be next to the barcode?

The human-readable data elements of the unique identifier do, whenever the dimensions of the packaging allow it. Where they do not, the product code and serial number should at least share a surface so the pack can be decommissioned manually, with the other elements as close as possible. The batch number and expiry date are a separate case: they are labelling particulars in their own right, and there is no obligation to place them adjacent to the code.

Is a national code required on a European pack?

Only where the member state requires it. The Commission's country annex records, for example, that the German pharmacy number must be indicated on the labelling. Where a national requirement exists, the information belongs in the boxed area reserved for that member state — the blue box — in that state's own language, naming the state, and ideally in the same position on every pack in the range.

What happens if a Data Matrix will not scan?

In the supply chain, the pack cannot be verified or decommissioned at the point of dispensing, which is the whole purpose of the code. In regulatory terms the manufacturer has not met the obligation to use a printing quality that ensures accurate readability for the required period, and if the printing quality used was below the presumption threshold they may be asked to prove that it was nonetheless met. The practical cost depends entirely on when it is discovered — on the file, at the press check, or in a pharmacy.

Can artwork proofreading software check the barcode grade?

It can check the code's contents, its check digit, its fields, its headers and its surroundings on the file, and it can decode the code on a printer's proof. A print quality grade is a measurement of a printed pack using a measuring instrument under a defined geometry, so it belongs to the press check and to incoming inspection, not to the artwork step. Software that implies otherwise is describing a measurement nobody took.

Labeling & Artwork Proofreading.
See it on your own files.

An agentic solution from Botminds. Every carton, label and leaflet compared with its approved text, character by character, in every language. Book a demo, or explore how it works.