Healthcare & specialty

NDC Barcode barcode

How a US drug’s National Drug Code becomes a GTIN and appears in a linear or Data Matrix barcode.

Also known as: National Drug Code, UPC-A number system 3, GTIN for pharmaceuticals, DSCSA 2D

What is NDC Barcode?

The National Drug Code (NDC) is the FDA’s ten-digit identifier for a drug product, in three segments for labeler, product, and package. It becomes a GTIN by adding a leading 3 and a check digit, giving the UPC-A that pharmacy registers scan, and a leading 003 for the GTIN-14 inside the Data Matrix that the Drug Supply Chain Security Act requires on every saleable unit, alongside lot, expiry, and serial. The eleven-digit NDC used for billing is a different formatting of the same number and does not appear in barcodes.

Encodes: GTIN-12: 3 + ten-digit NDC + check digit, in a UPC-A. GTIN-14: 003 + NDC + check digit in a GS1 DataMatrix with (17), (10), and (21).

UPC-A for the NDC 12345-678-90 as a GTIN-12: number system 3, the ten NDC digits, check digit 6.

Open NDC Barcode in the generator

How NDC Barcode is structured

The NDC does not change; the packaging around it does. A ten-digit FDA identifier is wrapped in a GS1 number so ordinary scanners and trading partners can use it.

Part Length What it means
Labeler code 4 or 5 digits Assigned by the FDA to the manufacturer, repackager, or distributor.
Product code 3 or 4 digits The specific strength, dosage form, and formulation.
Package code 1 or 2 digits The package size and type.
GS1 wrapper 3 or 003 prefix + check digit Turns the NDC into a GTIN-12 for UPC-A or a GTIN-14 for 2D and logistics carriers.
Production identifiers (17) 6 digits, (10) and (21) up to 20 characters Expiry, lot, and serial, required by DSCSA on the saleable unit.

Specifications

NDC
10 digits in 4-4-2, 5-3-2, or 5-4-1 segments: labeler, product, package
GTIN-12
3 + NDC + GS1 check digit; the number system 3 is reserved for drugs
GTIN-14
003 + NDC + check digit; carried in (01) inside GS1 DataMatrix or GS1-128
Retail carrier
UPC-A on the consumer package for pharmacy point of sale
DSCSA carrier
GS1 DataMatrix with (01) GTIN, (17) expiry, (10) lot, (21) serial on each saleable unit
Case carrier
GS1-128 with the same element strings, or GS1 DataMatrix
Regulators
FDA for the NDC and barcode rules; GS1 for the carriers and element strings

Dimensions are GS1 General Specifications targets. Confirm against the retailer’s current routing guide before a print run.

Where it is used

  • Pharmacy point of sale for over-the-counter and prescription packages
  • DSCSA serialization and verification of saleable units
  • Hospital bedside scanning and medication administration records
  • Wholesaler receiving, aggregation, and EPCIS event exchange
  • Chargeback and rebate claims that key on the NDC
Generated per shipment

The GTIN is fixed; the serialized 2D code is printed per unit

The NDC-derived GTIN lives on the product record and the UPC-A is packaging artwork. The DSCSA Data Matrix is generated on the packaging line for every unit from the lot, expiry, and a commissioned serial, then aggregated to the case and pallet so a wholesaler can verify a unit by scanning the outer container. Serials must come from one controlled source; a repackager generates its own under its own labeler code.

Retailers whose routing guides call for it

Each retailer page covers the transaction sets, labeling rules, and reported chargebacks behind the requirement.

Mistakes that cost money

Eleven-digit NDC in the barcode

The billing format pads a segment with a zero to make 5-4-2. Barcodes use the ten-digit FDA format. Padding it makes the GTIN check digit wrong.

Dropping the number system 3

A UPC-A of the NDC without the leading 3 collides with another company’s GTIN range and is not recognized as a drug.

QR Code instead of Data Matrix

DSCSA specifies a 2D Data Matrix. Pharmacy and wholesaler systems are built for it.

Serial not matched to aggregation

The serial on the unit must appear in the case aggregation and the EPCIS shipping event the wholesaler receives, or the unit fails verification.

Expiry format mismatch

(17) is YYMMDD. Human-readable text may show month and year, but the encoded date must be complete.

Repackaging under the original labeler code

A repackager or relabeler needs its own labeler code, NDC, and GTIN. Reusing the manufacturer’s breaks traceability.

How Endless handles NDC Barcode

Endless stores the NDC and its derived GTINs on one product record, carries lot, expiry, and serial on the unit and batch records, and produces the case aggregation and shipping documents from the same data, so verification requests resolve and chargeback claims key on the right NDC.

Frequently asked questions

How do I turn an NDC into a GTIN?

For a GTIN-12, prefix the ten-digit NDC with 3 and compute the GS1 check digit. For a GTIN-14, prefix with 003 and compute the check digit. Both encode the same NDC; the 14-digit form is what goes in (01) inside Data Matrix and GS1-128.

What barcode does DSCSA require?

A GS1 DataMatrix on each saleable unit carrying the GTIN, serial number, lot, and expiration date, with the same data in human-readable form, and serialized aggregation up through the case and pallet.

Why does my NDC have ten digits in one place and eleven in another?

The FDA assigns ten digits in three segment patterns. Billing systems pad one segment with a zero to a uniform 5-4-2 eleven-digit format. Barcodes always use the ten-digit form.

Related symbologies

  • Data Matrix

    The compact matrix code on pharmaceuticals, medical devices, electronics, and small parts.

  • UPC-A

    The 12-digit retail barcode scanned at point of sale across North America.

  • GS1-128

    The Code 128 subset that carries GS1 Application Identifiers, the barcode on every carton and pallet shipping label.

Definitions in the glossary

Browse the full barcode symbology guide.

Book an Endless Commerce demo

See it on your channels.

Spend your time on the business, not the busywork. Book a demo and watch Endless run your operations across every channel you sell on.

Get a Demo