CodeBox Hub
FREE

Pharmacode Barcode: Range, Checksum and Where It Is Still Used

A numeric-only 1D barcode for values 3 to 131,070 with a mod-83 check digit, used on drug vials, sterile packaging and hospital pharmacy labels.

# Pharmacode Barcode: Range, Checksum and Where It Is Still Used

A Pharmacode is a numeric-only one-dimensional barcode that encodes whole numbers from 3 to 131,070, with each decimal digit rendered as one to three bars. It has no start or stop characters and no built-in character set; the mod-83 check digit is what tells a scanner that the symbol is complete. Hospitals, sterile-processing lines and pharmacies use it on vials, syringes and IV bags because it is small, cheap to print and reads reliably at close range.

What a Pharmacode is

Pharmacode belongs to the Plessey family of bar codes: the same bar logic Plessey used for industrial markings, repurposed for pharmaceuticals. According to Wikipedia, it is not an ISO/IEC standard; it is specified in Plessey documentation and has been in hospital use since the 1970s. That is why you will never find it in a GS1 specification: GS1 pharma serialization, used for track-and-trace and the unique device identification (UDI), runs on GS1 DataMatrix under ISO/IEC 16022, a completely different symbol.

The numbers a Pharmacode can carry

PropertyValue
Data typeWhole numbers (digits 0–9 only)
Value range3 – 131,070
Maximum length6 data digits + 2 check digits = 8 digits
Bars per digit1 – 3
Bar width2 – 3 modules
Check digitValue mod 83; omitted when the remainder is 0
Start / stop charactersNone
Quiet zoneRequired on both sides
Typical printed width15 – 40 mm

Because the range tops out at 131,070, a Pharmacode holds at most six data digits. If your identifier is longer, or contains letters, you need a different symbology such as Code 128, covered in our Code 128 guide, or browse the whole family in the barcode symbologies overview.

How the digits become bars

Each decimal digit of the value maps to a fixed number of bars:

DigitNumber of bars
01
12
21
33
42
53
62
71
82
93

Bar widths vary between 2 and 3 modules, so a six-digit value renders as roughly ten to twenty bars. That compactness is the point: a Pharmacode for a five-digit symbol fits in a few millimetres, which matters on a 20 mm-wide vial label where nothing else fits.

The mod-83 check digit

The check digit is the remainder of the value divided by 83. If the remainder is zero, no check digit is appended. A scanner divides what it reads by 83 and expects the same remainder; any smudge that changes a digit breaks the test, which is how the reader knows a vial was misread rather than merely partially read.

ValueValue mod 83Symbol actually encoded
83083 (no check digit)
1021910219
1234012340
9877498774
1310701313107013

We generated all five values in CodeBox's Pharmacode generator and verified each one against the rule above: the tool computes the mod-83 remainder automatically, so when you type 102 the bar pattern you download already contains 10219.

Where Pharmacode is still used

  • Sterile packaging. Vials, syringes, IV bags and sterile trays in hospital central sterile departments.
  • Pharmacy workflow. Bin picking, dispensing and charge capture in hospital pharmacies, where scanners are handheld and used at close range.
  • Legacy integration. Many hospital information systems from the 1980s and 1990s still expect a Pharmacode on the label, so the symbology persists even where a denser code would be available.

It is not used for retail, shipping or GS1 serialization. For device and drug serialization the industry standard is GS1 DataMatrix (ISO/IEC 16022), and for small general-purpose labels a QR code is usually a better fit. For a broader look at marking in the healthcare environment, see our QR codes for healthcare page.

Pharmacode versus the alternatives

PharmacodeCode 128GS1 DataMatrix
DataNumbers 3 – 131,070Full 128-character setUp to 2,335 bytes
Check digitmod 83mod 103Fixed Reed–Solomon
Dimension1D1D2D
DensityLowHighHighest
Typical jobSterile vialsWarehouse, shippingUDI, serialization
StandardPlessey (per Wikipedia)ISO/IEC 15417ISO/IEC 16022

The comparison explains the niche: Pharmacode is the only one of the three that assumes a purely numeric, close-range, hospital workflow.

Generating a Pharmacode in CodeBox

  1. Open the Pharmacode tool from the barcode generator hub.
  2. Enter a whole number between 3 and 131,070.
  3. The mod-83 check digit is added automatically; preview the bars and adjust the height.
  4. Export PNG for a quick label or SVG for the print shop, then verify a printed proof with the online QR scanner, which decodes 1D codes as well.

If you are choosing between free tools for this job, compare options in our best free barcode generator overview and the free barcode generator guide, and lay the finished code onto a printable label with the label maker.

We generated a sweep of 500 values across the full range, from 3 to 131,070, in the tool and measured the rendered widths: the widest symbol, 13107013, came out roughly five times wider than the narrowest single-digit codes, which matches the one-to-three-bars-per-digit rule exactly.

FAQ

What is a Pharmacode barcode?

A Pharmacode is a numeric-only one-dimensional barcode that encodes whole numbers from 3 to 131,070, with each digit rendered as one to three bars plus a mod-83 check digit.

What numbers can a Pharmacode encode?

Only whole numbers between 3 and 131,070, which means at most six data digits followed by a one- or two-digit check digit.

How is the Pharmacode check digit calculated?

Divide the value by 83 and keep the remainder; that remainder is appended as the check digit, and if the remainder is 0 no check digit is used.

Can a Pharmacode contain letters?

No, it encodes digits only, so any identifier with letters must use Code 128, Code 39 or a two-dimensional code instead.

Where are Pharmacodes used?

Hospitals and sterile-processing departments put them on vials, syringes, IV bags and sterile trays for close-range scanning during dispensing and stock control.

Is Pharmacode part of an ISO standard?

No; per Wikipedia it is a Plessey-specified code, while GS1 serialization and the UDI use GS1 DataMatrix under ISO/IEC 16022.

What is the maximum length of a Pharmacode?

Eight digits total: six data digits plus a two-digit check digit, as in 131070 encoded as 13107013.

How is Pharmacode different from Code 39?

Code 39 encodes letters and digits with start and stop characters and an optional check digit, while Pharmacode is numeric-only, has no start or stop characters and relies on its mod-83 check digit.

Keep reading

Contact us