Comparison
The best open-source QR code generators
For libraries, the standouts are qrcode on npm (MIT), Python's qrcode and segno (BSD), ZXing (Apache 2.0, encode and decode), and Nayuki's QR Code generator, the respected multi-language reference implementation (MIT). For a finished hosted product that is itself open source, UseQR is MIT-licensed end to end. Judge every option by licence and maintenance activity.
Two different questions hiding in one search
"Open-source QR generator" means either a library you embed in your own code, or a product — a generator with a UI and API — whose source you can read, fork and self-host. The lists are different and conflating them produces bad recommendations, so here they are separately.
The libraries
| Library | Language | Licence | Notes |
|---|---|---|---|
| qrcode (npm) | JavaScript | MIT | The default in the JS ecosystem; detailed comparison |
| qr-code-styling | JavaScript | MIT | Styled codes — dots, eyes, logos; comparison |
| qrcode (PyPI) | Python | BSD | The default in Python; comparison |
| segno | Python | BSD | Rigorous ISO/IEC 18004 coverage incl. Micro QR, zero dependencies |
| ZXing | Java (+ ports) | Apache 2.0 | Encodes and decodes; the decoder is the industry workhorse, now in maintenance mode |
| Nayuki QR Code generator | Java, TS, Python, Rust, C++, C | MIT | The respected reference implementation — small, correct, readable |
Two of these deserve a sentence more. Nayuki's QR Code generator is what you read when you want to understand how encoding actually works — one careful codebase ported across six languages, widely treated as a reference. ZXing matters because it decodes: any serious pipeline should read its codes back after generating them, and ZXing (or a port) is usually the reader — it is what UseQR's own verify loop uses. The wider field, including Go, Rust and PHP options, is surveyed in QR libraries compared.
The products
Most generator websites are closed — free to use, but you cannot read, audit or redeploy them. The open exceptions are worth knowing:
- UseQR (MIT) — this site: generator UI, 28 payload builders written from the real specs, keyless API, MCP server, decode-verification. The entire codebase is public, so "trust us" can be replaced with "read it". Disclosure: this is our page, which is exactly why the libraries above are listed first.
- Library-plus-page builds — many small open generators are a static page wrapping
qrcodeorqr-code-styling. Perfectly good; judge them individually by the criteria below.
If your interest in open source is really about running it yourself, that is its own decision with its own trade-offs — covered in the self-hosted roundup and the self-hosting guide.
How to judge any option
- Licence. MIT/BSD/Apache mean unrestricted commercial embedding. Copyleft licences (GPL family) are fine for self-hosting but constrain embedding in proprietary code — check before you build on anything.
- Maintenance. Look at the commit log, not the star count. A QR library can be legitimately "done" — the spec is from 2000 and stable — but a decoder or a product accumulating unfixed issues is a different signal.
- Correctness evidence. Tests against the spec, and ideally decode-verification of output. Encoding bugs are silent; they produce codes that mostly scan.
- Payload scope. Libraries encode strings; the WiFi/UPI/EPC payload formats on top are where most real-world failures happen. Check whether the project handles them or leaves them to you.
Honest bottom line
Inside your own codebase: use a library — qrcode, segno, or Nayuki depending on language and taste, with ZXing reading the output back. For a finished product you can audit and redeploy: UseQR is, to our knowledge, the most complete MIT-licensed option, and you can verify any of its output independently rather than taking our word.
FAQ
What is the best open-source QR code library?
qrcode (npm) for JavaScript, qrcode or segno for Python, ZXing where you also need decoding, and Nayuki's QR Code generator as the reference implementation across six languages. All are permissively licensed.
Is there a fully open-source QR code generator website?
Yes. UseQR is MIT-licensed end to end — UI, payload builders, API and verification — and can be self-hosted. Most other generator sites are closed products with free tiers rather than open source.
Are open-source QR generators free for commercial use?
The permissively licensed ones (MIT, BSD, Apache 2.0) are, with obligations limited to attribution notices. Check the licence file on anything GPL-family before embedding it in proprietary software.
Why does open source matter for QR codes?
Auditability and permanence. You can verify what happens to the data you encode, and if a hosted service disappears, an open codebase can be redeployed — printed static codes never depended on the service anyway.
Try it — free, no signup
Related
- The best self-hosted QR code generators — What self-hosting actually protects — payload privacy and permanence — the credible options from libraries to full products, and the honest ops cost.
- UseQR vs the qrcode npm package — A product and a library are different tools. Inside a Node codebase the qrcode package is often the right call — here is the honest decision matrix.
- UseQR vs the Python qrcode library — In a Python codebase, qrcode or segno is usually the right answer — we say so. Where an API earns its place: no-dependency scripts, typed payloads, verification.
- UseQR vs the qr-code-styling library — qr-code-styling is the JS library behind many styled-QR generators. If you are building a generator UI, use it. If you need verified codes now, use a product.