Comparison of Python QR Code libraries

Features

Description

qrcode

qrcodegen

Segno

Library license

BSD

MIT

BSD

Library version

7.4.2

1.8.0

1.6.2.dev

Mode Numeric

Yes

Yes

Yes

Mode Alphanumeric

Yes

Yes

Yes

Mode Byte

Yes

Yes

Yes

Mode Kanji

No

Yes

Yes

Mode ECI

No

Yes

Yes

Mode FNC1

No

No

No

Mode Structured Append

No

No

Yes

Mode Hanzi [1]

No

No

Yes

Mixing modes

Yes

Yes

Yes

QR Codes version 1 - 40

Yes

Yes

Yes

Micro QR Codes version M1 - M4

No

No

Yes

Output acc. to ISO/IEC 18004:2015(E) Fig. 1 [2]
1-M QR code encoding 'QR Code Symbol'

No
1-M QR code encoding 'QR Code Symbol' using mask 4

No
1-M QR code encoding 'QR Code Symbol' using mask 4

Yes
1-M QR code encoding 'QR Code Symbol' using mask 5

Output acc. to ISO/IEC 18004:2015(E) Fig. 2
M2-L Micro QR code encoding '01234567'

Yes
M2-L Micro QR code encoding '01234567'

Find maximal error correction level

No

Yes

Yes

Optimize QR Codes

Yes

No

No

PNG output

Yes

No

Yes

SVG output

Yes

No

Yes

EPS output

Yes

No

Yes

PDF output

Yes

No

Yes

PAM output

No

No

Yes

PBM output

Yes

No

Yes

PPM output

Yes

No

Yes

LaTeX support

No

No

Yes

XBM output

Yes

No

Yes

XPM output

No

No

Yes

PNG data URI

No

No

Yes

SVG data URI

No

No

Yes

Text output

Yes

No

Yes

ANSI escape code output

Yes

No

Yes

Other output formats (i.e. JPEG)

Yes

No

Yes via plugin

Black and white QR Codes

Yes

Yes

Yes

Colored QR Codes

Yes

No

Yes

Animated QR Codes (GIF, APNG, WebP)

No

No

Yes via plugin

Changing size of modules (scaling factor)

Yes

No

Yes

Command line script

Yes

No

Yes

Plugins

No

No

Yes

Default encoding in Byte mode

ISO/IEC 8859-1 or UTF-8

ISO/IEC 8859-1 or UTF-8

ISO/IEC 8859-1 or UTF-8

3rd party dependencies

Pillow or Pymaging and Pymaging-PNG (Windows: colorama)

Performance

Some performance indicators. The script benchmarks.py ran on Intel i7-8559U / CPython 3.11. Each SVG / PNG image uses a scaling factor of 10 (aside from qrcodegen which does not support any scaling).

Create a 1-M QR code

1-M QR code encoding “QR Code Symbol”

Chart showing the results of creating a 1-M QR code.

Create a 7-Q QR code

7-Q QR code encoding “QR Code Symbol”

Chart showing the results of creating a 7-Q QR code.

Create a 30-H QR code

30-H QR code encoding “QR Code Symbol”

Chart showing the results of creating a 30-H QR code.

Create a QR code and serialize it as SVG

Create a QR code 1-M “QR Code Symbol” and serialize it as SVG document.

Chart showing the results of creating a 1-M QR code and export it as SVG image.

Create a QR code and serialize it as PNG

Create a QR code 1-M “QR Code Symbol” and serialize it as PNG image.

Chart showing the results of creating a 1-M QR code and export it as SVG image.

The comparison included PyQRCode in all years before 2022. In the meantime, six years have passed without any updates and PyQRCode has lost its connection in many aspects.

Although popular, it lost all feature and performance comparisons, therefore it is no longer part of this comparison.