NDC (National Drug Code)
identity.medical.ndc10-11 digit identifier for drug products in the US, assigned by the FDA. Three segments: labeler code, product code, package code. Common formats with dashes: 4-4-2, 5-3-2, or 5-4-1 (totaling 10 digits). May also appear as 11 digits with zero-padded segments.
Shape
^\d{4}-\d{4}-\d{2}$|^\d{5}-\d{3}-\d{2}$|^\d{5}-\d{4}-\d{1}$|^\d{11}$| Value | Length | Shape |
|---|---|---|
| 0002-1433-80 | 12 | matches |
| 12345-678-90 | 12 | matches |
| 12345-6789-0 | 12 | matches |
| 00021433801 | 11 | matches |
| 0002-1433-8 | 11 | rejected: one character short |
Background
Origin
The National Drug Code, or NDC, is a unique product identifier used in the United States for labelling prescription and over-the-counter drugs.[1] The Drug Listing Act of 1972 requires registered drug establishments to give the Food and Drug Administration a current list of all the drugs they make for commercial distribution.[1] Drug products are identified and reported in that listing using a unique, three-segment number called the National Drug Code.[2] The FDA describes the NDC as a universal product identifier for human drugs.[2]
Under 21 CFR 207.33, each finished drug product or unfinished drug subject to listing must have a unique NDC that identifies its labeler, product, and package size and type.[3] The first segment, the labeler code, is assigned by the FDA.[3] A labeler is any firm that manufactures (including repackers or relabelers), or distributes under its own name, the drug.[2] The second segment, the product code, identifies a specific strength, dosage form and formulation for a particular firm.[2] The third segment, the package code, identifies package sizes and types.[2]
A 4-digit labeler code may be combined only with a 4-digit product code and a 2-digit package code, giving the 4-4-2 configuration.[3] A labeler must use only one product-package configuration across all the NDCs that carry its labeler code.[3] The FDA background page explains that because the NDC is limited to 10 digits, a firm with a 5-digit labeler code must choose between a 3-digit product code with a 2-digit package code, or a 4-digit product code with a 1-digit package code.[2]
The FDA's final rule, Revising the National Drug Code Format and Drug Label Barcode Requirements, adopts a uniform, 12-digit format for the NDC.[4] The rule takes effect on March 7, 2033.[4] On that date the FDA will assign new 12-digit NDCs and convert all previously assigned 10-digit NDCs to the 12-digit format.[4] Until then, from March 5, 2026 to March 6, 2033, the FDA will continue to assign 10-digit NDCs in the current formats.[4] Companies are told to convert to the new format by adding leading zeros to the labeler code, product code and/or package code segments as needed.[4] A three-year labelling transition runs from March 7, 2033 to March 6, 2036, during which the FDA does not intend to object to 10-digit NDCs on drug labels.[4] The rule affects only FDA-assigned NDCs and does not change the HIPAA standard 11-digit format used for reimbursement.[4]
Use
Because of a conflict with the HIPAA standard of an 11-digit NDC, many programmes pad the product code or package code with a leading zero.[2] The FDA warns that, since a zero can be a valid digit in the NDC, this padding can cause confusion when reconstituting the NDC to its FDA standard form.[2] The FDA's own example is that 12345-0678-09 could be 12345-678-09 or 12345-0678-9, depending on the firm's configuration.[2] An 11-digit NDC cannot be turned back into the 10-digit standard format without the help of a product listing database.[1] Treat the hyphenated 10-digit form and the unhyphenated 11-digit form as two spellings of one code, and keep whichever you received as text so the leading zeros survive. (Meridian's view) When you need to join two sources, normalise both to the 11-digit form rather than trying to strip zeros back out. (Meridian's view)
Unhyphenated 10-digit NDCs are ambiguous: 1234-5678-90, 12345-678-90 and 12345-6789-0 would all read as 1234567890.[1] The pure 10-digit NDC cannot be transformed back into the standard format with dashes without the product listing database.[1] A bare run of ten digits is a red flag; look up the labeler code in the FDA's directory before guessing where the dashes go. (Meridian's view)
The FDA's NDC Directory gives the NDCPackageCode as the labeler, product and package code segments separated by hyphens.[5] Older NDC directory data, from the paper-based listing system, sometimes inserted an asterisk in the product or package code as well as the dashes.[1] If an old extract has an asterisk in an NDC, delete it before validating the code rather than rejecting the row. (Meridian's view)
RxNorm's normalised NDCs follow the 11-digit, no-dashes HIPAA format.[6] RxNorm's examples show 0591-0933-01 normalised to 00591093301 and 60951-700-85 normalised to 60951070085.[6] The RxNorm API's getNDCStatus function accepts an NDC as CMS 11-digit, or 5-3-2, 5-4-1 or 4-4-2, with no asterisks.[7] Sources may write the same package with different digit counts, so check which form a column holds before matching on it. (Meridian's view) It is worth giving NDC columns room for 12 digits now, rather than hard-coding 10 or 11. (Meridian's view)
Where you'll meet it
The FDA publishes the listed NDC numbers in its NDC Directory, which is updated daily.[8] The NDC Directory is offered as downloadable database files in text and Excel versions, alongside an application programming interface.[8] openFDA serves NDC Directory data through an API that it updates daily and converts into JSON.[9]
Sources
- [1]National drug code - Wikipediasecondary source
- [2]National Drug Code Database Background Information | FDAdocumentation
- [3]21 CFR § 207.33 - What is the National Drug Code (NDC), how is it assigned, and what are its requirements? | Electronic Code of Federal Regulations (e-CFR) | US Law | LII / Legal Information Institutestandard
- [4]National Drug Code Format | FDAdocumentation
- [5]NDC Package File Definitions | FDAdocumentation
- [6]RxNorm Technical Documentationdocumentation
- [7]getNDCStatus - RxNorm APIdocumentation
- [8]National Drug Code Directory | FDAorganisation
- [9]Drug NDC Overvieworganisation
Detection notes
NDC formats vary by segment width. The FDA accepts multiple formats. Transformation preserves the string since the dash-separated format carries structural meaning.
Use it
$ finetype infer -i "0002-1433-80" --mode column
→ identity.medical.ndc
SELECT ft_infer('0002-1433-80');
-- → 'identity.medical.ndc'CAST({col} AS VARCHAR)Schema
https://meridian.online/schemas/identity.medical.ndc · Frictionless type string
finetype taxonomy identity.medical.ndc -o json-schema