Comparison

Pharmacode vs. Data Matrix: Choosing the Right Barcode for Pharmaceutical Packaging in 2026

Pharmacode vs Data Matrix in 2026: what each symbology encodes, which one EU FMD and US DSCSA actually require, and when pharma packaging needs both.

Written by
Drug Database
Published
Updated
Reading time
8 min
Pharmacode vs. Data Matrix: Choosing the Right Barcode for Pharmaceutical Packaging in 2026
On this page · 9 sections
  1. 01What is Pharmacode and where is it used today?
  2. 02What is Data Matrix and why is it gaining traction in pharma?
  3. 03Pharmacode vs Data Matrix: how do capacity, error correction and scanning compare?
  4. 04Which barcode does the regulation actually require?
  5. 05What are Pharmacode's limitations?
  6. 06How do you implement each one in packaging and data systems?
  7. 07When should you use Pharmacode, when Data Matrix, and when both?
  8. 08Next steps for operations teams and developers
  9. 09FAQ

Use both — but not in the same job. Pharmacode stays on the carton as a line-control and packaging-verification mark. Data Matrix carries the regulated product identifier (GTIN, serial number, lot, expiry) on the unit-of-sale pack. If you can only fit one and you ship into the EU or the US, Data Matrix wins on regulation, not on preference.

A Pharmacode carries exactly one integer, and the published range runs from 3 to 131070. A Data Matrix carries a GTIN, a serial number, a batch and an expiry date in the same square centimetre — and it survives a scuff, because ECC 200 uses Reed–Solomon error correction. That gap is the whole decision.

Key takeaways

  • Pharmacode is a packaging-control mark: one number, no error correction, read by a laser scanner at line speed.
  • Data Matrix is a data carrier: structured, error-corrected, read by a camera.
  • EU FMD has required a 2D Data Matrix with a unique identifier on prescription packs since 9 February 2019.
  • US DSCSA requires a product identifier in a 2D Data Matrix; the FDA's enforcement stabilization period ran to 27 November 2025, with small-dispenser relief later.
  • Switzerland sits outside the EU FMD. Swiss market packs follow Swissmedic's rules and BAG-SL listing, and Pharmacode remains common on Swiss cartons.

What is Pharmacode and where is it used today?

Pharmacode is a linear symbology that encodes a single integer between 3 and 131070 as a series of bars of varying width. It has no check digit and no error correction. In 2026 it is still everywhere on pharmaceutical packaging lines — on folding cartons, leaflets and labels — where it acts as a printed identity for the pack rather than a carrier of regulated data.

Its job is verification, not traceability. A fixed-mount laser scanner reads the Pharmacode on the carton as it moves down the line and confirms the right carton is being fed to the right product. If the code does not match the job, the line stops. That is a packaging-control function, and it is genuinely good at it: fast, cheap to print, tolerant of the low-resolution printing you get on a busy carton.

There is also 2D-Pharmacode, a separate symbology listed in Seagull Scientific's barcode symbology guide. As of October 2026 it remains a niche option. I would not build a new line around it unless a customer contract already specifies it.

What is Data Matrix and why is it gaining traction in pharma?

What is Data Matrix and why is it gaining traction in pharma?

Data Matrix is a 2D symbology that encodes structured data in a square grid, with Reed–Solomon error correction in the ECC 200 variant. In pharma it is the carrier for serialization: the product identifier, batch number and expiry date, and in the EU a unique serial number per pack. OPTEL's overview of Data Matrix in the pharmaceutical industry covers the traceability use case it is built for.

The traction is regulatory, not aesthetic. Once a regulator says "the pack must carry a unique identifier that can be verified at dispensing", you need a symbology that holds multiple fields, survives handling, and can be verified by a camera. A single-integer linear code cannot do that.

GS1 publishes a healthcare guideline for Data Matrix — the GS1 DataMatrix healthcare guideline. Honest limit: when I checked that URL in October 2026 the request was blocked and the document would not load, so I am citing it as the reference document rather than quoting from it. Get the PDF from GS1 directly before you build to it.

Pharmacode vs Data Matrix: how do capacity, error correction and scanning compare?

Pharmacode vs Data Matrix: how do capacity, error correction and scanning compare?

The two symbologies differ on every axis that matters to an operations team. Pharmacode is a single-number packaging mark with no error correction, read by laser. Data Matrix is a structured, error-corrected data carrier read by a camera. They are not substitutes, which is why so many lines run both.

DimensionPharmacodeData Matrix (ECC 200)
What it encodesOne integer, 3–131070Structured data: GTIN, serial, lot, expiry, plus application identifiers
Error correctionNone; no check digitReed–Solomon error correction
Reader requiredLaser / fixed-mount line scannerCamera-based imager
Typical rolePackaging control and line verificationSerialization, traceability, dispensing verification
Regulatory mandateNone in EU FMD or DSCSARequired by EU FMD since 9 Feb 2019; required by DSCSA product identifier rules
Print toleranceHigh — designed for coarse carton printingLower — needs verification and grading
Human readabilityNoNo, but often printed with human-readable text alongside

Two things follow from that table. First, a laser scanner that reads your Pharmacode cannot read your Data Matrix. If you add serialization to an existing line, you are adding cameras, not reusing optics. Second, Pharmacode's tolerance for bad printing is a real advantage — cartons are not labels, and a camera-based code on a carton needs its print quality controlled in a way a Pharmacode never did.

Which barcode does the regulation actually require?

Regulation picks Data Matrix for serialization and is silent on Pharmacode. The EU Falsified Medicines Directive, Delegated Regulation (EU) 2016/161, has applied since 9 February 2019 and requires a 2D Data Matrix on prescription medicine packs carrying a product code, serial number, batch number and expiry date, plus a tamper-evident seal. US DSCSA requires a product identifier — NDC, serial number, lot and expiry — in a 2D Data Matrix; the FDA's main enforcement stabilization period ran to 27 November 2025, with small-dispenser relief extending later.

Switzerland is the interesting case. It is not bound by the EU FMD, so Swiss obligations come from Swissmedic's own rules, and reimbursement data flows through the BAG Spezialitätenliste rather than an EU hub. Pharmacode remains a common sight on Swiss cartons for that reason. If you work on the Swiss market, our walkthrough of the Swissmedic Spezialitätenliste 2026 and its digital changes is the place to start on the data side.

What are Pharmacode's limitations?

Pharmacode cannot carry a serial number, cannot carry a batch or expiry date, has no error correction and no check digit, and cannot be verified by the camera infrastructure you are already installing for serialization. That is the honest list. It is not a flaw in the symbology — it was never asked to do those things.

The practical limitation is subtler: a Pharmacode tells your line that the right carton is present. It tells your warehouse, your wholesaler and your pharmacy nothing. Every downstream question — is this pack genuine, is it recalled, has it already been dispensed — needs a Data Matrix and a database behind it. Pharmacode's ceiling is the end of your own packaging hall.

How do you implement each one in packaging and data systems?

Pharmacode implementation is a printing and line-control task: assign the number, put it in the artwork, grade the print, wire the scanner to the line controller. Data Matrix implementation is a data task that happens to end in print. You need a serial number source, a repository or at least a serial ledger, a print-and-verify station, and a way to reconcile what you printed against what you shipped.

The reconciliation is where teams underestimate the work. A Data Matrix that encodes a serial number is only useful if that serial exists in a system that a wholesaler or a pharmacy can query. On the US side that means NDC-level identifiers — our developer's guide to National Drug Codes in 2026 covers the identifier structure. On the clinical-data side, if the scanned pack has to land in a patient record, the exchange format is FHIR R4 for medication data. And if you are aligning identifiers across markets, the EMA IDMP 2026 deadlines set the timeline for the EU side.

When should you use Pharmacode, when Data Matrix, and when both?

Use Pharmacode when the only question is "is this the right pack on this line?" Use Data Matrix when the question involves anyone outside your building. Use both on any pack that is both printed on a high-speed line and shipped into a serialized market — which, in 2026, is most prescription packaging.

The order matters. Get the Data Matrix right first, because it is the regulated one and the one that fails verification. Then keep the Pharmacode if your line control already depends on it. Teams that try to migrate Pharmacode to Data Matrix as a one-for-one swap usually discover they have removed a line-control function they still need.

Next steps for operations teams and developers

Start with the register, not the printer. Identify the code your product already carries in each market — NDC in the US, the national code and BAG-SL entry in Switzerland, the EU product code under FMD — and confirm it matches what your artwork will print. A Data Matrix that encodes the wrong identifier is worse than no Data Matrix, because it verifies.

You can check identifiers in the Drug Database catalogue by name, ATC code, NDC or Pharmacode, and compare what the register says against what your packaging says. Developers who want the same lookups programmatically can start with the API reference on the same site. Neither step requires a call with anyone.

FAQ

What is the difference between Pharmacode and Data Matrix?

Pharmacode encodes a single integer from 3 to 131070 with no error correction, and is read by a laser scanner for packaging-line control. Data Matrix encodes multiple structured fields with Reed–Solomon error correction, and is read by a camera for serialization and traceability. Only Data Matrix satisfies EU FMD and US DSCSA identifier requirements.

Does DSCSA require Data Matrix or Pharmacode?

DSCSA requires a product identifier in a 2D Data Matrix — NDC, serial number, lot and expiry. It does not require Pharmacode. The FDA's main enforcement stabilization period ran to 27 November 2025, with small-dispenser relief extending beyond that date.

Can a Pharmacode scanner read a Data Matrix?

No. Pharmacode is read by laser scanners that measure bar widths. Data Matrix requires a camera-based imager. Adding serialization to an existing line means adding imaging hardware, not reconfiguring the scanners already installed.

Does Switzerland require a Data Matrix on medicine packaging?

Switzerland is not bound by the EU Falsified Medicines Directive, so obligations come from Swissmedic's own rules rather than Delegated Regulation (EU) 2016/161. Pharmacode remains common on Swiss cartons for packaging control, and reimbursement data is published through the BAG Spezialitätenliste.

Is 2D-Pharmacode a replacement for Data Matrix?

No. 2D-Pharmacode is a separate symbology listed in Seagull Scientific's barcode guide, and as of October 2026 it remains a niche option. It does not carry the GS1-structured product identifier that EU FMD and DSCSA require.

Try it

Check a medicine yourself.

Search by brand, substance or ATC code across the official registers with a free account. Each record names the register it came from.

  • Brand, substance or ATC code
  • The source register and date on every record
  • Where else the same medicine is registered
Search a medicineTry it free

Free: 10 lookups in total and a one-time 5¢ AI credit · no card

Countries covered: United Kingdom, United States, Czechia, Finland, Spain, Switzerland, Poland, Belgium, Netherlands, Sweden, Germany, Denmark, France, Canada, Japan, Italy, Ireland, Norway, Iceland.