Pharmaceutical serialization with QR codes

Pharmaceutical serialization with QR codes

Every box of prescription medicine that crosses a border, sits on a pharmacy shelf, or reaches a patient now carries something it did not carry twenty years ago: a unique digital identity. Pharmaceutical serialization with QR codes is the practice of assigning a singular fingerprint to every saleable unit of a drug, encoding that fingerprint into a scannable 2D code, and tracking the unit through every stage of the supply chain. It sounds simple. The infrastructure behind it is not.

For compliance leads, packaging managers, and supply chain teams, serialization is no longer an emerging topic. It is the baseline. The Falsified Medicines Directive in Europe and the Drug Supply Chain Security Act in the United States have made unit-level traceability a legal requirement, and regional frameworks across Brazil, Russia, South Korea, Saudi Arabia, and Indonesia have followed. The question is no longer whether to serialize. The question is how to serialize well, and how to choose the right code carrier for the realities of a modern packaging line.

This guide walks through what pharmaceutical serialization is, what data each code carries, which regulations drive adoption, and how the operational workflow runs from the printer head on a packaging line to the verification scan at the pharmacy counter.

What is pharmaceutical serialization and why are QR codes the carrier?

Pharmaceutical serialization is the process of assigning a unique identifier to each saleable unit of a pharmaceutical product, allowing that unit to be tracked individually through the supply chain. Unlike batch-level tracking, where thousands of units share a single lot number, serialization makes every box, bottle, or blister pack individually identifiable. That uniqueness is what makes counterfeit detection, recalls, and end-to-end traceability possible.

The carrier for that identifier needs to fit on small packaging, survive printing at high line speeds, and hold a meaningful amount of structured data. One-dimensional barcodes cannot meet those demands. A linear barcode stores roughly twenty characters, far less than what serialization requires. Two-dimensional codes, including QR codes and the GS1 DataMatrix, store hundreds of characters in a compact square that fits comfortably on a folding carton.

That is why the pharmaceutical industry moved decisively to 2D codes. They carry the data structures regulators demand, they scan reliably from damaged or curved surfaces, and they integrate with both industrial vision systems and consumer smartphones.

What goes inside a serialized pharmaceutical code?

A serialized code is not a random string. It is a structured payload that follows GS1 standards, ensuring that any compliant scanner anywhere in the world can interpret it the same way. The four core data elements are:

  • Global Trade Item Number (GTIN): identifies the product itself. A 25mg tablet of a specific brand has one GTIN, regardless of where or when it was manufactured. The GTIN is the product-level identity.
  • Serial number: the element that makes each individual unit unique. Two boxes of the same product, from the same batch, will share a GTIN and a lot number, but their serial numbers will differ.
  • Batch or lot number: identifies the production run. This is what enables targeted recalls. If a quality issue is detected in a specific batch, only units carrying that lot number need to be pulled from the market.
  • Expiration date: critical for both safety and supply chain logistics. Dispensing systems can flag expired stock automatically when the code is scanned.

Together, these four elements describe what the product is, which production run it came from, when it expires, and which specific unit it is. That combination is what makes unit-level traceability possible.

The regulatory landscape driving pharma serialization

Three major regulatory frameworks shape how the pharmaceutical industry approaches serialization, with regional variations layered on top.

Falsified Medicines Directive in the European Union

The Falsified Medicines Directive, formally Directive 2011/62/EU, requires that every prescription drug sold in the European Union carries a unique identifier and a tamper-evident seal. The unique identifier must be verified through the European Medicines Verification System, a network of national repositories connected to a central European hub. At the point of dispensing, pharmacists scan the code, the system confirms the unit is authentic and has not been previously dispensed, and the unit is then marked as supplied in the database.

The FMD was designed as a closed verification loop. Manufacturers upload serial data when units leave the factory. Pharmacies verify and decommission codes when units reach patients. Anything that does not match in that loop triggers an alert.

Drug Supply Chain Security Act in the United States

The Drug Supply Chain Security Act, known as DSCSA, mandates unit-level traceability for prescription drugs across the United States supply chain. The law has been phased in over several years, with full unit-level traceability requirements progressively taking effect across manufacturers, wholesalers, dispensers, and repackagers. Unlike the FMD’s central verification model, DSCSA relies on interoperable electronic exchange of transaction data between trading partners, so each link in the chain holds its own verified record of every unit’s movement.

Other regional frameworks

Beyond Europe and the United States, similar mandates exist in Brazil, Russia, South Korea, Saudi Arabia, and Indonesia, where BPOM governs pharmaceutical traceability. Each framework has its own data formats, repository structures, and verification rules, which creates real complexity for pharmaceutical manufacturers operating globally. A single product line may need to carry codes that satisfy multiple regulatory regimes, each with its own data requirements.

QR codes versus GS1 DataMatrix in pharma packaging

Both QR codes and GS1 DataMatrix are 2D codes capable of carrying the same structured data. The data matrix has historically dominated pharmaceutical packaging because it is more compact at small print sizes and tolerates a wider range of print quality. On a small folding carton, every square millimeter matters, and the DataMatrix has been the practical choice for primary regulatory marking.

QR codes are gaining ground, particularly for consumer-facing serialization. They are universally recognized, every smartphone camera reads them natively without a specialized app, and they pair naturally with the GS1 Digital Link standard, which encodes serialization data inside a web URL. A patient scanning a QR code on a medicine box can be taken directly to authenticity verification, dosage information, or safety alerts, while the same code remains fully readable by regulatory and supply chain systems.

Side-by-side comparison of a GS1 DataMatrix and a QR code printed on identical white pharmaceutical cartons

Many manufacturers now use both. A DataMatrix on the inner packaging for industrial scanning, a QR code on the outer carton or leaflet for patient interaction. The data inside can be identical, but the code form factor is matched to who is scanning it.

What does the pharmaceutical serialization workflow look like?

The operational workflow runs from code generation to point-of-dispense verification, with several technical and quality checks along the way.

  1. Generate unique identifiers. A serialization software system creates the unique serial numbers for each saleable unit, drawing from pre-allocated ranges or generating on demand. Each serial is logged before any code is printed.
  2. Print serialized codes on the packaging line. Because every code is unique, traditional offset or flexographic printing cannot produce them. Variable data printing, typically high-speed digital inkjet or laser marking, applies each code individually as units pass on the line.
  3. Vision camera verification. Immediately after printing, inline vision cameras inspect each printed code for legibility, contrast, and structural accuracy. Codes that fail inspection trigger automatic rejection of the unit, and the corresponding serial is flagged in the system so it does not enter circulation as a missing or duplicate code.
  4. Aggregation. Saleable units are packed into bundles, cases, and pallets, each with their own codes. The serialization system records which units are inside which case, and which cases are on which pallet. This is what allows a single scan of a pallet code to confirm the contents of thousands of underlying units.
  5. Upload to repositories. Serialized data is uploaded to national or global repositories, depending on the regulatory framework. In Europe, this means the European Medicines Verification System. In the United States, this means the interoperable data exchange systems used by trading partners under DSCSA.
  6. Verification at every transition. As units move from manufacturer to wholesaler to distributor to pharmacy, codes are scanned at each handover. The system confirms the unit’s authenticity and updates its status.
  7. Decommissioning at dispense. When a pharmacist dispenses the unit, the code is marked as supplied. From that point forward, that specific serial cannot be verified again. Any attempt to do so signals a duplicate, which is a red flag for counterfeit activity.

How does serialization protect against counterfeit drugs?

The anti-counterfeit logic of serialization is elegant in its simplicity. A unique code should appear in exactly one place at any given time. If the same serialized code is scanned in Paris and Bangkok within hours of each other, one of those units is not authentic. If a code is scanned at a pharmacy and the system shows it was already decommissioned last week, that unit cannot be what it claims to be.

This is why real-time verification at the pharmacy level is the strongest defense against falsified medicines. It catches problems at the last moment before the product reaches the patient. Aggregation adds another layer, since cases and pallets carry their own codes that should be consistent with the units inside. A pallet whose case-level data does not match the manufacturer’s records is flagged before it even reaches the dispensing point.

Serialization alone does not eliminate counterfeit risk. Determined counterfeiters can copy codes, reuse decommissioned codes, or attempt to inject fake serials into the supply chain. What serialization does is shift the economics. Every counterfeit attempt now has to either match a valid live serial, which will be detected through duplicate scans, or use an invalid serial, which will be detected on the first verification. The window for falsified product to circulate undetected narrows significantly.

How does GS1 Digital Link change serialized QR codes?

GS1 Digital Link is the standard URI format for structured product identification, capable of encoding the GTIN, serial number, batch, lot, and expiry inside a single web-compatible URL. This matters because it lets one QR code serve very different audiences from the same physical mark.

A regulatory authority scanning the code can extract the structured GS1 data elements directly. A supply chain partner using a scanner gets the same data routed into their warehouse management system. A pharmacist gets verification through their dispensing software. A patient scanning the same code with a phone camera lands on a product page with dosage information, safety alerts, or authenticity confirmation.

The same square of black-and-white pixels. Four different experiences, each one tailored to who is scanning. This is what makes GS1 Digital Link the format of choice for manufacturers planning a unified approach to compliance and consumer engagement.

What does consumer-facing serialization unlock?

When patients scan a serialized QR code, the experience does not have to stop at authenticity verification. The same code can guide them to dosage instructions, contraindications in their language, links to report adverse events, refill reminders, or recall notices for their specific batch.

Dynamic QR codes are central to making this work. The serialized data is fixed and stays fixed, since that is what regulators verify. But the content layer that patients reach when they scan can be updated without reprinting packaging. A safety update issued by a manufacturer reaches every patient who scans the code that day, including patients holding boxes that were printed two years ago. Static QR codes cannot do that. Every QR code generated with QRCodeKIT is dynamic, which is why the platform fits naturally alongside GS1 Digital Link for the consumer-facing layer of pharmaceutical serialization.

What are the common implementation challenges?

Serialization programs rarely fail at the conceptual level. They fail at the integration points.

The first challenge is connecting serialization software to packaging line hardware. Printers, vision cameras, conveyor controls, and rejection systems all need to communicate in real time, often across equipment from different vendors and different generations. A single misaligned signal between the print head and the vision camera can stop a line.

The second is data governance across global repositories. A manufacturer shipping into the EU, US, Brazil, and South Korea must upload data to four different systems with four different formats and four different validation rules. Master data alignment, particularly for GTINs and product hierarchies, becomes a quiet but constant operational concern.

The third is volume. A mid-sized pharmaceutical manufacturer generates hundreds of millions of unique serial numbers per year. Storing, transmitting, and verifying those serials reliably requires database infrastructure that legacy ERP systems were not designed to handle.

The fourth is print quality at line speed. A packaging line running at three hundred units per minute leaves milliseconds per code for printing and verification. Substrate variation, ink drying time, and minor mechanical drift can all degrade code legibility just enough to push reject rates above acceptable thresholds.

None of these are insurmountable. They are the day-to-day reality of running a compliant serialization program, and they are where experienced operations teams earn their value.

Warehouse worker scanning a pallet code with a handheld industrial scanner in a pharmaceutical distribution center

Frequently asked questions

Is pharmaceutical serialization a legal requirement everywhere?

Not yet, but coverage is broad and growing. Serialization is mandatory for prescription drugs in the European Union under the Falsified Medicines Directive, in the United States under the Drug Supply Chain Security Act, and in a growing list of countries including Brazil, Russia, South Korea, Saudi Arabia, and Indonesia. Each framework has its own scope and timelines, so manufacturers operating across regions need to verify the rules for each market they supply.

What is the difference between batch tracking and serialization?

Batch tracking identifies production runs. Serialization identifies individual units within those runs. With batch tracking alone, a recall pulls every unit from a given lot, regardless of which units have actually moved through the supply chain. Serialization narrows that visibility to the unit level, so it becomes possible to trace exactly which serials are still in circulation and which have already been dispensed.

Can a QR code on pharmaceutical packaging be updated after printing?

The serialized data inside the code is fixed and cannot change, since that is what regulators verify. But if the QR code uses a dynamic URL structure, the content patients see when they scan can be updated at any time. That is the model GS1 Digital Link enables for consumer-facing serialization.

Why do some pharma companies use DataMatrix instead of QR codes?

The GS1 DataMatrix is more compact at very small print sizes and has been the historical standard for pharmaceutical regulatory marking. QR codes carry the same data structures and are gaining adoption, especially for consumer-facing layers where smartphone scanning matters. Many manufacturers now use both formats on the same product, matched to who is scanning.

What happens to a serialized code after a patient receives the medicine?

The code is decommissioned in the verification system at the moment of dispense. From that point on, the serial is marked as supplied and cannot be re-verified. Any future attempt to verify the same serial will trigger an alert, which is the mechanism that detects reused or copied codes.


All images and visual content in this article were created using RealityMAX.

New - Free to get started

Your QRs now
answer questions

Meet Cleo, the AI that lives inside your QR codes. She answers questions, recommends, and guides your users. Any industry, zero human effort.
Brands

+1,200 businesses already use Cleo