LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

qrencode

Encode text into QR code images

TLDR

Generate QR code to terminal
$ qrencode -t ANSI "[text]"
copy
Generate PNG image
$ qrencode -o [qr.png] "[text]"
copy
Generate SVG
$ qrencode -t SVG -o [qr.svg] "[text]"
copy
Set size
$ qrencode -s [10] -o [qr.png] "[text]"
copy
Read from stdin
$ echo "[text]" | qrencode -o [qr.png]
copy

SYNOPSIS

qrencode [options] [string]

DESCRIPTION

qrencode is a command-line QR code generator built on the libqrencode library. It encodes text into QR codes and outputs them in multiple formats including PNG, SVG, EPS, ANSI terminal art, and ASCII, making it suitable for both display and print use cases.Options control the error correction level (L/M/Q/H), QR version (which determines capacity and physical size), and module size for raster output. Input can come from command-line arguments or standard input, supporting integration into scripts and pipelines.

PARAMETERS

STRING

Text to encode.
-o FILE
Output file.
-t TYPE
Output type (PNG, SVG, ANSI).
-s SIZE
Module size.
-l LEVEL
Error correction level.
-v VERSION
QR version (size).

CAVEATS

Maximum data capacity depends on QR version and error correction level. Higher error correction reduces capacity. Binary data may need -8 flag for 8-bit mode.

HISTORY

qrencode was written by Kentaro Fukuchi and is built on the libqrencode library. It provides command-line QR code generation in various output formats.

SEE ALSO

zbarimg(1), qr(1)

Copied to clipboard
Kai