Skip to content

^BY Bar Code Field Default

Sets module width, wide-to-narrow ratio and height for the barcodes that follow.

Barcodes · Updated 2026-10-20

Syntax

^BYw,r,h

Parameters

ParameterWhat it doesValues
wModule (narrow bar) width, in dots.1 to 10; default 2
rWide-to-narrow bar ratio.2.0 to 3.0; default 3.0
hBar height, in dots.default 10

Common mistakes

  • ^BY stays in effect for the rest of the label, including the height. A QR code (^BQ) after a tall ^BY is shifted down by that height, as on a real printer: reset with ^BY2,3,10 before it.

Example

Edit the code and the label redraws. This is the same engine as the API.

Try it

Preview

100%

Questions

What does ^BY do in ZPL?

Sets module width, wide-to-narrow ratio and height for the barcodes that follow.

What is the syntax of ^BY?

^BYw,r,h

What should I watch out for with ^BY?

^BY stays in effect for the rest of the label, including the height. A QR code (^BQ) after a tall ^BY is shifted down by that height, as on a real printer: reset with ^BY2,3,10 before it.

Related commands