Skip to content

Barcode formats

Every value accepted by BarcodeObject.format is listed below. The public BarcodeFormat union is exported from @burnmark-io/designer-core and covers 44 formats from five categories.

For usage patterns (size, colour, validation, QRContent helpers) see the Barcodes guide.

For advanced per-format options not exposed through BarcodeOptions, consult the bwip-js BWIPP documentation — core serialises BarcodeObject.options directly to bwip-js's internals, so any BWIPP option is reachable by setting the field in the serialised .label JSON.

1D (linear) barcodes

FormatCategoryTypical use
code1281DGeneral-purpose shipping, asset tagging. Auto-selects the most efficient subset.
code128a1DCode 128 forced to subset A (uppercase + control chars).
code128b1DCode 128 forced to subset B (uppercase + lowercase + digits).
code128c1DCode 128 forced to subset C (pairs of digits).
code391DOlder industrial; uppercase letters, digits, -. $/+% only.
code39ext1DCode 39 Extended — escape sequences for lowercase + ASCII punctuation.
code931DDenser than Code 39. Mixed case and more symbols.
code111DTelephony; digits + dash. Two checksums.
codabar1DLibrary systems, blood banks.
ean131DRetail EAN-13 — GTIN encoding. Always 13 digits.
ean81DShort EAN-8 — small retail items.
upca1DUS UPC-A — 12-digit retail.
upce1DCompressed UPC-E — 8-digit.
itf141DShipping carton ITF-14 — outer-pack GTIN.
interleaved2of51DWarehousing, cardboard labelling. Even digit count required.
pharmacode1DPharma package verification.
msi1DShelf-edge retail labels.

2D barcodes

FormatCategoryTypical use
qrcode2DURLs, Wi-Fi, contacts, ticketing. See QRContent.
microqr2DSmall-payload QR variant — fits in ~10 × 10 modules.
datamatrix2DIndustrial marking, small parts. Square default.
datamatrixrectangular2DSame algorithm, rectangular symbol shapes.
pdf4172DBoarding passes, ID cards, dense alphanumeric payloads.
micropdf4172DCompact PDF417 variant.
azteccode2DTransport ticketing (SNCF, Deutsche Bahn), boarding passes.
aztecrune2DAztec Rune — short fixed-length 2D code.
maxicode2DUPS shipping labels. Fixed module pattern.
dotcode2DDirect-part marking on cylindrical items.
hanxin2DChinese Han Xin code — denser Chinese-character support.
hibccode1282DHIBC (healthcare industry barcode) on Code 128.

GS1 family

FormatCategoryTypical use
gs1_128GS1 / 1DFNC1-led Code 128 with application identifiers. Shipping, logistics.
databarGS1 / 1DGS1 DataBar Omnidirectional.
databarexpandedGS1 / 1DGS1 DataBar Expanded — longer alphanumeric payloads.
gs1qrcodeGS1 / 2DQR with GS1 FNC1 structure — pharma, medical.
gs1datamatrixGS1 / 2DData Matrix with GS1 FNC1 structure.
gs1_ccGS1 / 2DGS1 Composite Component — two-stacked combinations.

GS1 formats accept application identifiers written in parentheses: (01)03012345678900(17)260401(10)BATCH42. Core passes them through to bwip-js, which expands them to the FNC1-separated wire format.

Postal barcodes

FormatCategoryTypical use
postnetPostalUSPS POSTNET — legacy 5/9/11-digit ZIP.
royalmailPostalUK Royal Mail 4-state customer code.
kixPostalPostNL KIX — Dutch delivery sorting. Alphanumeric postcode + house number.
onecodePostalUSPS Intelligent Mail Barcode (IMB).
auspostPostalAustralia Post 4-state.
japanpostPostalJapan Post Customer Code.
leitcodePostalDeutsche Post Leitcode — routing.
identcodePostalDeutsche Post Identcode — tracking.

Specialised

FormatCategoryTypical use
isbt128MedicalISBT 128 — blood and tissue labelling.
pznMedicalPharmazentralnummer — German pharmaceutical identifier.

BarcodeOptions

Passed as BarcodeObject.options. Core forwards these to the underlying bwip-js renderer:

ts
interface BarcodeOptions {
  scale?: number;
  rotate?: 'N' | 'R' | 'L' | 'I';
  padding?: number;
  includetext?: boolean;
  textsize?: number;
  textyoffset?: number;
  eclevel?: 'L' | 'M' | 'Q' | 'H';
  version?: number;
  rows?: number;
  columns?: number;
}
  • scale — multiplier for bar width / module size. Default is chosen by bwip-js to fit the bounding box.
  • rotate'N' (none), 'R' (90° CW), 'L' (90° CCW), 'I' (180°). Combines with BaseObject.rotation; most use cases want one or the other, not both.
  • padding — quiet-zone size around the symbol, in module widths.
  • includetext — show the human-readable text alongside the symbol. 1D only; 2D barcodes ignore.
  • textsize, textyoffset — fine-tune the human-readable text.
  • eclevel — error-correction level. Applies to qrcode, microqr, azteccode, gs1qrcode. 'L' (7%), 'M' (15%, default), 'Q' (25%), 'H' (30%).
  • version — force a specific QR / Data Matrix / PDF417 size. Most callers should omit and let bwip-js pick.
  • rows, columns — PDF417 and Data Matrix layout hints.

For any option not listed here, set it directly in the serialised .label JSON's options object — core passes unknown keys through. The bwip-js option reference lists every knob per format.

Colour routing

Barcode colour follows the same rules as every other object. color is a CSS string; the render pipeline routes the barcode to a printer plane via PrinterCapabilities.cssMatch. Practical guidance:

  • Keep barcodes #000000 on white background unless you've tested with your target scanner. Red-on-white has measurably lower scanning reliability than black-on-white.
  • Avoid opacity < 1.0 on barcodes — the dithering in the 1bpp pipeline will break most scanners.
  • 2D barcodes (QR, Aztec, Data Matrix) tolerate imperfect rendering better than 1D — built-in error correction absorbs a few damaged modules.

See Colour model for the full matching rules.

Not affiliated with Dymo, Brother, Avery, or any hardware vendor.