qr – generate QR code

qr [ –LMQHna ] [ –v version ]

Qr generates a QR code from the data it reads on standard input. The QR code is generated as an image(6) on standard output.

The –LMQH options set the level of error correction. –L is the lowest and –H is the highest level. The default is –M.

The QR standard defines different sizes labelled version 1 to version 40. By default the smallest possible is chosen automatically. The –v option forces the use of a particular version.

By default bytes are encoded directly with no translation. Coding efficiency can be increased by reducing the set of legitimate characters using the –an options. The –n option supports only numbers and the –a option supports letters, numbers, spaces and the symbols $%*+–./:. Note that all letters are converted to upper case. Both options ignore any characters they do not recognize.


International Standard ISO/IEC 18004.

The standard specifies the use of JIS–8 encoding in the default mode, however rumour has it that readers recognize UTF–8.

The more advanced coding features (Kanji mode, extended modes, switching modes midstream) are not supported.