^BQ QR Code Barcode

Barcodes ZPL caret command

Prints a QR Code symbol from the data of the next field; the field data must begin with switches that select the error-correction level and the input mode.

Format ^BQa,b,c,d,e

^BQ parameters

Parameters of ^BQ
ParameterMeaningAccepted valuesDefault
afield orientationpp. 128, 129, 134

Orientation of the symbol. The guide lists only normal orientation and says ^FW has no effect on the rotation.

Unlike most other barcode commands, ^BQ does not take its orientation from ^FW.

The guide's table lists only the value normal (^FW has no effect on rotation). It gives no letter in the table; its own examples write N in this position or leave it empty.

Not stated in the guide.

bmodelp. 128

Which QR Code model is produced: the original specification or the enhanced one.

The guide says model 2 adds features and can be told apart from model 1 automatically, and that it should normally be used.
  • 1model 1, the original specification
  • 2model 2, the enhanced form; the guide recommends it
2
cmagnification factorp. 128

Size of one module of the symbol, as a multiplier.

1 to 100

Depends on the printer resolution: 1 on 150 dpi, 2 on 200 dpi, 3 on 300 dpi, 6 on 600 dpi.

derror correctionpp. 128, 129

Error-correction level of the symbol.

The same four letters are also written in the field data as the error-correction switch. The guide does not say which of the two takes precedence if both are given.
  • Hultra-high reliability level
  • Qhigh-reliability level
  • Mstandard level
  • Lhigh-density level

The parameter table says Q if the parameter is empty and M for invalid values. The ^FD switch text says M is the default. See the guide-issue note.

emask valuep. 128

Mask pattern number applied to the symbol.

The guide gives no further explanation of the mask value.

0 to 7

7

^BQ notes and gotchas

  • Gotcha

    The data in the field must carry switches in a fixed order. Up to four switch fields are described: an optional mixed-mode switch (starts with D, ends with a comma), a mandatory error-correction letter (H, Q, M or L), a mandatory data-input letter (A or M) followed by a comma, and, only when the input is M, a character-mode switch. The data follows immediately after the last switch.

    pp. 129, 130
  • Note

    Automatic input (A) layout in normal mode: error-correction letter, the letter A, a comma, then the data. Manual input (M) layout in normal mode: error-correction letter, the letter M, a comma, a character-mode switch, then the data. With A the character mode is not given; with M it must be.

    pp. 131, 132
  • Note

    Character modes for manual input: N is numeric (digits 0 to 9); A is alphanumeric (digits, upper-case letters, space and the symbols $ % * + - . / :, which the guide counts as 45 characters); B followed by a four-digit count is 8-bit byte data; K is Kanji and every character after K must be 16-bit, so any 8-bit character causes an error.

    pp. 130, 131
  • Note

    With automatic input the binary codes 0x80 to 0x9F and 0xE0 to 0xFF cannot be set in the data.

    pp. 130, 131
  • Note

    Mixed mode lets several character modes share one symbol. Its switch is the letter D, a two-digit code number from 01 to 16, a two-digit number of divisions from 02 to 16, a two-digit hexadecimal parity value from 00 to FF, and a comma. The guide says the parity value comes from an exclusive-OR over the original input data. In mixed mode the number of data strings can be up to 200.

    pp. 129, 130, 133
  • Note

    Kanji data written in Unicode with ^CI28 to ^CI30 needs the JIS.DAT table loaded on the printer and specified.

    p. 134
  • Note

    The symbol is printed from the data in a following ^FD string. The guide lists numeric, alphanumeric, 8-bit byte and Kanji data as encodable, and four error-correction levels. The print ratio is listed as fixed.

    pp. 128, 1588
Where the guide contradicts itself (5)
  • Guide issue

    The error-correction default is stated two ways. The parameter table on page 128 reads Q if the parameter is empty and M for invalid values. The switch text on pages 129 to 131 says M is the default level. The guide does not reconcile them. It also calls the error-correction switch mandatory (required) in the same place it marks M as the default, and does the same for the data-input switch: headed required, yet A is marked as its default (pages 129 and 131).

    pp. 128 to 131
  • Guide issue

    The guide's list of alphanumeric characters on page 130 ends with a closing parenthesis right after the colon and before the count of 45 characters. Digits, upper-case letters, space and the eight symbols $ % * + - . / : already make 45, so with the parenthesis the list would be 46; the guide does not explain it.

    p. 130
  • Guide issue

    The byte-mode switch is written Bdddd on page 129 and Bxxxx on page 130. Page 130 says the four characters are exactly four decimal digits holding the number of characters; page 131 says the number of data characters is held as two bytes of BCD code.

    pp. 129 to 131
  • Guide issue

    The mixed-mode layout for automatic input on page 132 starts with the D switch, but the layout for manual input on page 133 leaves it out, although the example string below it starts with D. In that example the parity value in the string is 8F while the explanatory table beside it shows 0x0C. The example on page 134 uses 0C.

    pp. 132 to 134
  • Guide issue

    The orientation parameter is listed only as normal with no letter and no default, and the guide's own examples either write N or leave the parameter empty.

    pp. 128, 129, 134

^BQ example

example.zplZPL
^XA
^FO40,40^BQN,2,5^FDQA,PART-4471^FS
^XZ

A model 2 QR Code at a magnification of 5. The field data starts with the switches Q (error-correction level) and A (automatic input) followed by a comma, and the text after the comma is the data that is encoded.

Guides that use ^BQ

BarcoderX is a .NET SDK for thermal labels and barcodes. See the barcode types it covers.

Source Zebra, ZPL II, ZBI 2, Set-Get-Do, Mirror, WML Programming Guide, P1134473-11EN Rev A, 2026/07/05, pages 128 to 134, 144, 167, 1588.

Written by BarcoderX in its own words. Checked against the guide on 2026-11-14.

ZPL and ZPL II are trademarks of Zebra Technologies Corporation. This reference is written by BarcoderX in its own words from Zebra's published programming guide. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.