Skip to content

Pharmacode Generator for Blister and Carton Lines

Turn a number between 3 and 131070 into a Pharmacode symbol, the narrow and wide bar code used to sequence cartons on packaging machinery.

  • 100% free
  • No sign-up
  • Never expires
  • No watermark
Loading generator…

How to use the Pharmacode generator

  1. 1

    Enter the number

    Type the value between 3 and 131070 that your line logic expects. The preview redraws as you type and flags anything outside the range.

  2. 2

    Check the bar widths

    Compare the narrow and wide bars against the marking resolution you have. If the narrowest bar is smaller than the printer can hold, increase the size rather than the density.

  3. 3

    Download and test

    Export SVG for the artwork or PNG for a quick print, then scan it with the reader on the line before the run starts.

Features

  • Every integer from 3 to 131070, the full Pharmacode range
  • Symbol length grows automatically with the number
  • SVG and PNG export sized for line printing
  • Encoded in your browser, so your numbers are not uploaded for rendering
  • No watermark, no sign-up and no usage limit

What a Pharmacode actually encodes

A Pharmacode is not a product identifier. It encodes a single integer, and machinery uses that integer to sort, sequence or reject cartons as they move along the line. The number is drawn entirely as bar widths: reading the symbol from the bottom upwards, a narrow bar takes the running value and divides it by two, while a wide bar divides by two and adds one. Building the number down to 3 produces the bar sequence, which is why longer numbers make taller symbols.

The format was developed by Medicode in the 1980s for pharmaceutical packaging and is still specified by many blister and carton lines. Because the alphabet is only the two bar widths, the symbol is easy to print on simple equipment and easy for a dedicated reader to interpret.

Pharmacode symbol of narrow and wide bars with a wide stop bar at the end and a legend explaining each bar width
Narrow and wide bars over a fixed gap, closed by the stop bar at the top of the sequence.

Rules before you print

ConstraintDetail
Value range3 to 131070 inclusive. Zero, one and two have no symbol.
DirectionRead from the bottom of the symbol upwards, so orientation on the carton matters.
Bar ratioA wide bar is twice the narrow bar. Printers that smear the ratio will misread the value.
Check digitNone. The format relies on the reader, so verify the first units off the line.
Quiet zoneClear space above and below the bar stack, in the reading direction.

Where it is used

  • Blister and carton counting on pharmaceutical packaging lines.
  • Sorting and reject gating, where the machine only needs a number to match against a recipe.
  • Bottle and tube sequencing on lines that cannot justify a full Data Matrix serialization setup.

When to use something else

If the code has to identify a product rather than sequence a package, use a real product identifier: a Data Matrix or Code 128 carrying a GTIN, serial or lot number. Pharmacode carries one integer and nothing else, so it cannot hold dates, lot codes or GS1 application identifiers.

For regulated pharmaceutical serialization, the customer or regulator specification decides the symbol, and it is usually GS1 DataMatrix. Read that specification before generating anything.

Frequently Asked Questions

Why does the symbol get taller for bigger numbers?

Each bar contributes one step of the binary-style count, so a larger number needs more steps. The tallest symbols correspond to values near the 131070 ceiling.

Can a Pharmacode be scanned by a phone?

Not with a standard camera app. It is a machine-reading format, so test with the line reader that will actually use it.

Is there a check digit to catch a misprint?

No. The value is read directly from the bar widths, which is why print quality and the narrow-to-wide ratio matter more than they do in formats with built-in checksums.