Skip to content

Pharmacode Generator

Generate a Pharmacode, the binary code of narrow and wide bars that pharmaceutical packaging lines use to check that the right leaflet, label or carton is used. Enter a whole number from 3 to 131070 and the tool encodes it in the Laetus one track format and draws it as a PNG image or an SVG file. Packaging engineers can adjust the scale, bar height and printed number.

Reset

Frequently asked questions

Which numbers can a Pharmacode encode?

A whole number from 3 to 131070. Numbers outside that range, decimals and letters are refused with a message. Leading zeros are ignored.

How does Pharmacode encode a number?

Each bar is either narrow or wide and stands for a binary digit, read from right to left. The number is the sum of the values of the bars, so 3 is the shortest code and 131070 the longest, with 16 bars.

Does Pharmacode have a check digit?

No. Pharmacode has no check digit and no start or stop pattern, so it is meant for controlled production lines where the scanner knows which code to expect. That is also why it should not be used for retail products.

Where is Pharmacode used?

Pharmaceutical manufacturers print it on folding cartons, labels and package leaflets so that camera and laser readers on the packaging line can detect a wrong component. It is not read at a checkout.

Can I download the Pharmacode as a vector file?

Yes. Choose SVG for a vector file that stays sharp at any size in print and design software, or PNG for a raster image that works in documents, web pages and label printers. Both come with a white background and a white margin.

What do the scale and bar height change?

The scale from 1 to 10, default 3, multiplies the width of the bars and gaps. The bar height accepts 5 to 50 millimeters and defaults to about 25 millimeters.

Can I print the number under the bars?

Yes. The human readable text option prints the number below the code. Packaging lines normally read only the bars, so turn it off when the artwork has no room.

Does reading direction matter?

Yes. Pharmacode is not symmetric, so a reader that scans it backwards gets a different number. Make sure the code is oriented as your line's reader expects.

Is this the two track Pharmacode?

No. The tool generates the common one track Pharmacode. The two track variant, which stacks bars of different heights, is rarely used.

Is my number stored?

No. It is used only to draw the image you download.

About OneClick Pro

OneClick Pro is a free collection of more than 150 web tools for everyday work: converting images and units, formatting and validating code, checking domains and SEO, and working with text, dates and numbers. Every tool runs without registration or subscription, and what you enter is only used to calculate your result and is never stored. Use it as a quick toolbox for one-off tasks, or bookmark the tools you rely on every day.