Published Oct 27, 2026
# 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
| Property | Value |
|---|---|
| Data type | Whole numbers (digits 0–9 only) |
| Value range | 3 – 131,070 |
| Maximum length | 6 data digits + 2 check digits = 8 digits |
| Bars per digit | 1 – 3 |
| Bar width | 2 – 3 modules |
| Check digit | Value mod 83; omitted when the remainder is 0 |
| Start / stop characters | None |
| Quiet zone | Required on both sides |
| Typical printed width | 15 – 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:
| Digit | Number of bars |
|---|---|
| 0 | 1 |
| 1 | 2 |
| 2 | 1 |
| 3 | 3 |
| 4 | 2 |
| 5 | 3 |
| 6 | 2 |
| 7 | 1 |
| 8 | 2 |
| 9 | 3 |
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.
| Value | Value mod 83 | Symbol actually encoded |
|---|---|---|
| 83 | 0 | 83 (no check digit) |
| 102 | 19 | 10219 |
| 123 | 40 | 12340 |
| 987 | 74 | 98774 |
| 131070 | 13 | 13107013 |
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
| Pharmacode | Code 128 | GS1 DataMatrix | |
|---|---|---|---|
| Data | Numbers 3 – 131,070 | Full 128-character set | Up to 2,335 bytes |
| Check digit | mod 83 | mod 103 | Fixed Reed–Solomon |
| Dimension | 1D | 1D | 2D |
| Density | Low | High | Highest |
| Typical job | Sterile vials | Warehouse, shipping | UDI, serialization |
| Standard | Plessey (per Wikipedia) | ISO/IEC 15417 | ISO/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
- Open the Pharmacode tool from the barcode generator hub.
- Enter a whole number between 3 and 131,070.
- The mod-83 check digit is added automatically; preview the bars and adjust the height.
- 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.