Comparison of Python QR Code libraries

Features

Description qrcode PyQRCode qrcodegen Segno
Library license BSD BSD MIT BSD
Library version 5.3 1.2.1 1.0.0 0.2.5
Mode Numeric Yes Yes Yes Yes
Mode Alphanumeric Yes Yes Yes Yes
Mode Byte Yes Yes Yes Yes
Mode Kanji No Yes No Yes
Mode ECI No No Yes Yes
Mode FNC1 No No No No
Mode Structured Append No No No Yes
Mixing modes Yes No Yes Yes
QR Codes version 1 - 40 Yes Yes Yes Yes
Micro QR Codes version M1 - M4 No No No Yes
Output acc. to ISO/IEC 18004:2015(E) Fig. 1 Yes No No Yes
Output acc. to ISO/IEC 18004:2015(E) I.3. No (not available) No (not available) No (not available) Yes
Find maximal error correction level No No Yes Yes
Optimize QR Codes Yes No No No
PNG output Yes Yes No Yes
SVG output Yes Yes Yes Yes
EPS output Yes Yes No Yes
PDF output Yes No No Yes
XBM output Yes Yes No Yes
XPM output No No No Yes
PBM output Yes No No Yes
PAM output No No No Yes
LaTeX support No No No Yes
PNG data URI No kind of (not a URI) No Yes
SVG data URI No No No Yes
Text output Yes Yes No Yes
ANSI escape code output Yes Yes No Yes
Other output formats (i.e. JPEG) Yes No No No, but via PIL plugin
Black and white QR Codes Yes Yes Yes Yes
Colored QR Codes No Yes No Yes
Animated QR Codes (GIF, APNG) No No No No
Changing size of modules (scaling factor) Yes Yes No Yes
Command line script Yes No No Yes
Plugins No No No Yes
Default encoding in Byte mode UTF-8 ISO/IEC 8859-1 or UTF-8 UTF-8 ISO/IEC 8859-1 or UTF-8
3rd party dependencies six, Pillow or Pymaging and Pymaging-PNG (Windows: colorama) PyPNG

Performance

Some performance indicators. The script benchmarks.py ran on a MacBook Air 2,13 Core2 Duo using CPython 2.7.10. Each SVG / PNG image uses a scaling factor of 10 (aside from qrcodegen which does not support any scaling).

Create a QR Code

Create a 1-M QR Code “QR Code Symbol”.

Chart showing the results of creating a 1-M 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.