What Pharmacode is
Pharmacode (Pharmaceutical Binary Code / Laetus Pharmacode) is a simple binary barcode used on pharmaceutical packaging for production-line control (e.g. confirming the correct fold/leaflet is present), not for retail identification. bwip-js encodes it as a direct binary conversion of the value plus one, drawn as narrow (0) and wide (1) bars -- there is no check digit at all.
Generate it now
Enter a number from 3 to 131070 to see a live Pharmacode preview.
Valid input
The value must be 1 to 6 digits ("Pharmacode must be 1 to 6 digits") and, numerically, from 3 to 131070 ("Pharmacode value must be between 3 and 131070"). There is no check digit to compute or validate -- any value in that range is accepted as-is.
Key options
Supported options include includetext (show the value as text below the bars) and height. bwip-js's own real default for includetext is false; this genuinely works even though Pharmacode's own encoder never declares an includetext option itself -- it always builds the text content and bwip-js's shared rendering step decides whether to draw it.
Output and printing
Export SVG for packaging-line artwork or PNG for a quick proof.
Common uses
Pharmacode appears on pharmaceutical packaging and folding-carton production lines, where a photoelectric sensor checks the binary pattern to confirm the correct leaflet, carton, or blister configuration is present -- not as a consumer-facing retail code.
Example
See the live preview above, seeded with a bwip-js-verified valid value.
Size guidance
Pharmacode's narrow/wide bar-width ratio is fixed by bwip-js's own encoder and is not independently configurable beyond the height option.
Troubleshooting
A rejected value is a digit count outside 1-6, or a numeric value outside the 3-131070 range.
Related formats
Related formats: Code 32 (Italian Pharmacode) is a different, unrelated algorithm despite the similar name -- it is a Code 39 derivative with its own Luhn-style check digit, not a mode of this Pharmacode encoder. See also Pharmazentralnummer (PZN), the German pharmaceutical pack-identifier barcode.
FAQ
Is Pharmacode the same thing as Code 32 (Italian Pharmacode)?
No, even though both are colloquially called "pharmacode." They share no code: this Pharmacode encoder is a plain binary conversion with no check digit, accepting any value from 3 to 131070; Code 32 is a completely different, Code 39-based algorithm with an 8- or 9-digit input and its own computed check digit.
Do I need to enter a check digit for Pharmacode?
No -- Pharmacode has no check digit at all. Any value from 3 to 131070 is encoded directly.