# QR code libraries compared

> For generation: qrcode on npm (MIT) and segno or python-qrcode in Python cover most needs; qr-code-styling adds design. For decoding: zxing-cpp is the actively maintained engine with bindings everywhere; zbar is fast but aging; quirc is tiny for embedded. Generation and decoding are different problems — most projects need one library from each column.

Source: https://useqr.app/docs/developers/qr-code-libraries-compared · Last reviewed 2026-08-21 · UseQR is free forever, MIT licensed, no signup.

---

## Two ecosystems, not one

Generating a QR code and reading one are unrelated problems that happen to share a name.
Generation is deterministic maths — encode, add [Reed–Solomon](/glossary/reed-solomon)
codewords, mask, render. Decoding is computer vision — find the code in a noisy image,
correct perspective, sample modules, undo the maths. Libraries almost never do both well,
so most real projects pick one from each table.

## Generation libraries

| Library | Language | Licence | Notes |
|---|---|---|---|
| `qrcode` (npm) | JavaScript | MIT | Pure JS, no native deps, PNG/SVG/terminal output. The default choice in Node. |
| `qrcode.react` | React | ISC | Renders to canvas or SVG as a component. |
| `qr-code-styling` | JavaScript | MIT | Module shapes, gradients, logos — the styling layer others lack. |
| `qrcode` (PyPI) | Python | BSD | Long-standing default; PIL and SVG output. |
| `segno` | Python | BSD | Pure Python, no dependencies, Micro QR support, very complete spec coverage. |
| ZXing (Java) | Java/Android | Apache-2.0 | The historic reference; the Java project is in maintenance mode. |
| `go-qrcode` | Go | MIT | Simple PNG generation. |
| `@useqr/core` | TypeScript | MIT | UseQR's own engine: matrix, styled SVG, typed payload builders, decode-verify loop. |

Generation is a solved problem, so choose on the secondary axes: native dependencies
(none, ideally — it is what makes a library work in
[serverless](/docs/developers/qr-codes-in-serverless-functions)), SVG output (needed
[for print](/docs/print/why-you-should-print-qr-codes-from-svg)), and whether styling is
in scope.

## Decoding libraries

| Library | Language | Licence | Notes |
|---|---|---|---|
| zxing-cpp | C++ | Apache-2.0 | The actively developed rewrite of ZXing; bindings for Python, WASM, iOS, Android. |
| zxing-wasm | Browser/Node | MIT wrapper | WebAssembly build of zxing-cpp; same engine in browser and server. |
| zbar | C | LGPL-2.1 | Fast and battle-tested; the original project stalled, a community fork carries it. |
| pyzbar | Python | MIT | Thin wrapper over zbar; needs the zbar shared library installed. |
| quirc | C | ISC | A few thousand lines, no dependencies — built for embedded and microcontrollers. |
| jsQR | JavaScript | Apache-2.0 | Pure-JS decoder; convenient, but development has largely stopped. |

Maintenance status is the honest differentiator here. The original Java ZXing announced
maintenance mode; jsQR has been quiet for years; zbar survives through a fork. zxing-cpp
is the one decoding engine with clearly active development and first-party bindings on
every platform, which is why UseQR uses zxing-wasm for its [scanner](/scan), its decode
API and its CI. A deeper decoder comparison:
[ZXing vs quirc vs zbar](/docs/developers/zxing-vs-quirc-vs-zbar).

## Pick by use case

| You are building | Generation | Decoding |
|---|---|---|
| Node service or script | `qrcode` (npm) | zxing-wasm |
| React front-end | `qrcode.react` or `qr-code-styling` | BarcodeDetector + zxing-wasm ([pattern](/docs/developers/read-qr-codes-from-a-webcam-in-the-browser)) |
| Python pipeline | `segno` or `qrcode` | zxing-cpp (`pip install zxing-cpp`) |
| Android/iOS app | platform libraries or ZXing ports | zxing-cpp bindings / ML Kit |
| Microcontroller | custom (generation is small) | quirc |
| No dependencies allowed | [keyless API](/docs/developers/free-qr-code-api-no-key) | `POST /api/v1/decode` |

## The gap no library fills alone

No generation library can tell you whether its own styled output still scans — that
requires rasterising the result and running a real decoder over it. If you generate
codes that will be printed, wire generation and decoding together into a
[decode-verify loop](/docs/developers/building-a-decode-verify-loop); it is a few lines
once you have one library from each table.

## FAQ

### What is the best QR code library for JavaScript?
qrcode on npm for plain generation — pure JS, MIT, no native dependencies. Add qr-code-styling if you need module shapes, gradients or logos, and zxing-wasm if you also need to decode.

### What is the best QR code library for Python?
segno and qrcode are both solid BSD-licensed generators; segno is pure Python with unusually complete spec coverage. For decoding, zxing-cpp's official Python binding is the actively maintained choice over pyzbar.

### Is ZXing still maintained?
The original Java ZXing project is in maintenance mode, but zxing-cpp — a C++ rewrite with Python, WebAssembly and mobile bindings — is actively developed and is the practical successor for new projects.

### Can one library generate and decode QR codes?
A few try, but the strong tools specialise: generation is deterministic encoding while decoding is computer vision. The common production setup is one generator plus one decoder, connected by a verify step in tests.

## Try it

- https://useqr.app/url
- https://useqr.app/validate
- https://useqr.app/scan
