Two-track Pharmacode Generator

Generate Two-track Pharmacode barcodes in your browser with live preview, validation, and PNG/SVG export.

Advanced options
Enter a value to see a live preview.
Options

These map directly to real generator options; anything not listed here is available under Advanced options above.

What Two-track Pharmacode is

Two-track Pharmacode is a genuinely distinct pharmaceutical-packaging barcode algorithm -- not the same as the already-covered (single-track) Pharmacode, and not the same as the already-covered Code 32 (Italian Pharmacode) either, despite the similar names. bwip-js encodes the value using its own base-3 (ternary) conversion tables (pharmacode2_base3sub/pharmacode2_base3map/pharmacode2_htmult, confirmed directly by reading these global constants and the encoding loop that uses them) -- each ternary digit selects one of three bar states, drawn using two distinct bar heights (hence "two-track"). It draws its own bar pattern directly and delegates only the final rendering step to the shared linear renderer every plain linear symbol in this catalog uses, not to another symbology's own encoder.

Generate it now

Enter a number from 4 to 64570080 to see a live preview.

Valid input

The encoded value must be an integer from 4 to 64570080 ("Two-track Pharmacode value must be between 4 and 64570080") -- there is no check digit at all. (bwip-js's own length pre-check message says "1 to 6 digits," but the real governing constraint is this numeric range, which spans up to 8 digits; a value with more digits than that is rejected by the numeric bound, not the digit-count message.)

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; height's own real default is the sentinel -1, which pharmacode2 resolves itself to 4mm -- a different resolved value from the unrelated Pharmacode capability's own sentinel (which resolves to 1 inch/25.4mm).

Output and printing

Export SVG for packaging-line artwork or PNG for a quick proof.

Common uses

Two-track Pharmacode appears on pharmaceutical packaging and folding-carton production lines for machine-readable production control, the same general job as the unrelated single-track Pharmacode capability, using a different (base-3) encoding algorithm.

Example

See the live preview above, seeded with a bwip-js-verified valid value.

Size guidance

Two-track Pharmacode's bar-width and two-height-tier pattern are fixed by bwip-js's own encoder and are not independently configurable beyond the height option.

Troubleshooting

A rejected value is a number outside the 4-64570080 range, or a non-numeric input.

Related formats

Related formats: Pharmacode (a completely different, unrelated binary encoding algorithm despite the similar name, already in this catalog) and Code 32/Italian Pharmacode (a third, also-unrelated Code 39-derived algorithm, already in this catalog).

FAQ

Is Two-track Pharmacode the same thing as Pharmacode or Code 32?

No -- all three are colloquially "pharmacode-adjacent" but share no code. This capability is a genuine base-3 (ternary) encoding, drawn with two bar-height tiers. Pharmacode is a plain binary (base-2) conversion with no check digit. Code 32 (Italian Pharmacode) is a Code 39-based algorithm with its own computed check digit, re-encoded as base-32 alphanumeric text and drawn by calling the Code 39 encoder. Each is a genuinely distinct algorithm, not a mode or variant of the others.

Do I need to enter a check digit for Two-track Pharmacode?

No -- there is no check digit at all. Any value from 4 to 64570080 is encoded directly.