Best Open Source QR Code Generators (2026) | QR Nova
Best open source QR code generator libraries ranked by language, license, and complexity. MIT vs AGPL pitfalls, self-hosting tradeoffs, free tools.

This article was written by the QR Nova team. We build QR code software, which may inform our perspective.
Most roundups of "open source QR code generators" conflate two completely different things: a code library that draws a QR image, and a full-stack generator platform you can self-host. That confusion sends developers down the wrong path and sends non-developers to tools they can't actually run. Here's what actually matters.
Open source QR code libraries (MIT/Apache) give you the image, nothing else. No redirect URLs, no analytics, no dashboard. AGPL-licensed tools look free until you realize building a SaaS product on top of them may legally require you to open-source your entire codebase.
TL;DR
- Open source libraries generate static QR images. Dynamic codes (editable destination, scan tracking) require a redirect infrastructure that no free library provides.
- MIT and Apache 2.0 licenses are safe for commercial use. AGPL is not — it forces source disclosure for any networked service built on top of it.
- Self-hosting a full QR platform is only worth it at scale (100K+ codes/month programmatically) or with strict data residency requirements. For everything else, it adds DevOps cost with no business benefit.
- The best library depends on your stack: python-qrcode for Python, node-qrcode for Node.js, endroid/qr-code for PHP, ZXing for Java/Android, QRCoder for .NET.
Library vs Platform: The Distinction That Changes Everything
Start free — no subscription trap
Get startedBefore comparing tools, be clear on what you actually need. An open source library is a package you import into your code. It takes a string input and outputs a QR code image — PNG, SVG, or binary. That's the entire scope. There is no URL shortener, no server, no redirect. If you print that code, it points to whatever URL you encoded at creation time, forever. You cannot change it.
An open source platform is a self-hosted web application that handles image generation, URL redirects, a database, user authentication, and a web interface. These are far more complex to run, maintain, and scale. The best known self-hostable QR platform is Shlink (MIT), which is actually a URL shortener that happens to generate QR codes for its short links.
Think of the difference like buying a camera lens versus renting a photography studio. The lens is powerful, but it assumes you already have the camera body, a tripod, and know what you're doing. The studio comes with lighting, backdrops, and someone at the front desk. Neither is wrong — they serve different jobs.
The gap matters because 90% of people searching for "open source QR code generator" need one of these two things, and they're not the same thing:
- A developer who wants to generate QR codes programmatically inside an existing app → library
- A business that wants to avoid paying a monthly SaaS subscription and has a DevOps team → platform
The 6 Best Open Source QR Code Libraries
These are the best open source QR code generators for developers: battle-tested, actively maintained, and safe for commercial use. Each open source QR code library below ships under a permissive license with no SaaS restrictions.
python-qrcode — Python (MIT)
The most downloaded Python QR library, with over 4,000 GitHub stars. python-qrcode wraps the QR generation logic in a clean Pythonic API. Three lines of code generate a PNG. It supports all four error correction levels (L, M, Q, H per ISO/IEC 18004), multiple image factories (PIL/Pillow for PNG/JPEG, svgwrite for SVG), and basic color customization. Logo embedding requires manual PIL compositing — it's not built in.
- License: MIT — use freely in commercial projects
- Output formats: PNG, SVG, raw matrix
- Customization: Colors, module size, border (quiet zone), error correction level
- Logo support: Manual — overlay with PIL after generation
- Limitations: Python-only, no dynamic redirect layer, requires Pillow for PNG output
- Best for: Python web apps (Django/Flask), data pipelines, automation scripts, batch generation
node-qrcode — Node.js / Browser (MIT)
The dominant JavaScript QR library with over 1 million weekly npm downloads as of May 2026. node-qrcode runs in Node.js for server-side generation and in the browser via bundlers (Webpack, Vite, Browserify). Output methods include toDataURL() for base64 images, toString() for SVG or terminal output, and file output. It's pure JavaScript — no native binaries, no compilation step.
- License: MIT
- Output formats: PNG (canvas), SVG, UTF-8 terminal, data URL
- Customization: Color (light/dark RGBA), scale, width, quiet zone, error correction level, version (1-40)
- Limitations: Basic styling — no logo support, no rounded modules, no gradient fills. For advanced styling, pair with
qr-code-styling(also MIT) - Best for: Node.js APIs, React/Vue/Next.js apps, serverless functions, browser-side generation
ZXing — Java / Android (Apache 2.0)
ZXing ("Zebra Crossing") is the most widely deployed barcode library in the world. It powers the QR scanner in hundreds of millions of Android devices. Chances are, your phone's camera app scans QR codes through ZXing right now. It handles both encoding (generating QR images) and decoding (reading QR images from camera frames), covering over 15 barcode formats including QR, Data Matrix, PDF417, EAN, and UPC.
- License: Apache 2.0 — safe for commercial and proprietary use
- Output formats: BufferedImage (Java AWT), raw bit matrix
- Customization: Size, error correction, character encoding, margin
- Limitations: Java/JVM only, heavy dependency for projects that only need generation. ZXing is architecturally a scanner that also generates — the encoder works well, but it's not what the library was designed around
- Best for: Android apps (via ZXing Android Embedded), Java backend services, applications that need both encode and decode in one library
endroid/qr-code — PHP / Symfony (MIT)
The definitive PHP QR code library, with dedicated Symfony and Laravel integrations. endroid/qr-code generates PNG, WebP, SVG, EPS, and binary output. It supports logo embedding natively, label text below the code, custom foreground/background colors, and margin control. The Symfony bundle registers a route at /qr-code/{builder}/{data} for on-the-fly generation.
- License: MIT
- Output formats: PNG, WebP, SVG, EPS, binary
- Customization: Logo, label text, colors, size, margin, error correction
- Limitations: PHP-only, requires GD or Imagick extension for raster output
- Best for: Laravel and Symfony applications, PHP CMSs, e-commerce platforms (Magento/WooCommerce via PHP)
QRCoder — .NET / C# (MIT)
The standard QR library for the .NET ecosystem. Originally created by Raffael Herrmann, QRCoder has been maintained by the community since 2025 and has accumulated over 5 million NuGet downloads. It has zero external dependencies — no ImageMagick, no native binaries. Renderers cover PNG, SVG, XAML path, PDF, ASCII art, and even PayloadGenerators for WiFi, vCard, and calendar events.
- License: MIT
- Output formats: PNG, SVG, XAML, PDF, ASCII, BMP, PostScript
- Customization: Colors, pixel size, quiet zone, error correction, icon overlay
- Limitations: C# / .NET only, logo placement requires additional image manipulation
- Best for: ASP.NET Core APIs, WPF/WinForms desktop apps, Azure Functions, Blazor
nayuki/QR-Code-generator — Multi-language (MIT)
A lesser-known but technically excellent library by Nayuki Minase, available in Java, TypeScript/JavaScript, Python, Rust, C++, and C. The focus is correctness and minimalism. The library prioritizes exact ISO/IEC 18004 compliance with a clean API and no frills. There are no image rendering utilities; it outputs a raw boolean matrix that you render yourself. Ideal for embedded systems, Rust services, or any context where you need full control over the output format.
- License: MIT
- Output formats: Raw bit matrix (you handle rendering)
- Customization: Version, error correction, mask pattern, character encoding
- Limitations: No image output — intentional design choice. You write the pixel renderer
- Best for: Rust services, embedded systems, situations requiring exact spec compliance, multi-language projects
The AGPL Trap: Why License Type Matters More Than You Think
Most open source QR libraries use permissive licenses (MIT, Apache 2.0). You can use them in commercial projects, modify them, and keep your application proprietary. No conditions beyond attribution. This is the boring, correct answer and it's fine.
AGPL (GNU Affero General Public License v3) works differently. Standard GPL requires you to share source code when you distribute software. AGPL closes the "SaaS loophole": it requires source disclosure when users access the software over a network, even if you never distribute a binary.
For a QR code generation service, that distinction is consequential. If you build a web app that generates QR codes using an AGPL-licensed library, you may be legally required to publish your entire application's source code under AGPL. Google's open source policy explicitly prohibits AGPL internally for this reason.
As of May 2026, the most commonly referenced self-hosted QR/barcode platforms with AGPL components include Zint (barcode generator, GPLv3) and certain forks of QR generation tools. Before integrating any library, verify the license at the repository root — not just in the README, where license descriptions are sometimes imprecise.
Practical rule: For any commercial product or SaaS, stick to MIT or Apache 2.0 open source QR code libraries. If a tool you want to use is AGPL, either find a commercial license option (many AGPL projects offer dual licensing) or find an MIT alternative.
Concrete Examples at Three Complexity Levels
What "open source QR generation" actually means changes a lot depending on scale:
Low complexity: Single developer, internal tool
You're building a Django admin panel and need to print QR codes for warehouse shelf labels. Static codes, no tracking needed. Two lines of python-qrcode generate a PNG and save it to S3. Total setup time: 20 minutes. No infrastructure, no DevOps, no subscription. This is where open source libraries win cleanly.
Mid complexity: Marketing team, regional campaign
You're running a print campaign across 500 retail locations. You need to track scan counts per location, and the destination URL needs to be updatable without reprinting. A static QR library won't cut it. You need dynamic redirects. Options: (a) self-host Shlink with node-qrcode for image generation (requires a server, a database, ongoing maintenance), or (b) use a platform like QR Nova that handles the redirect layer, analytics, and image generation as a managed service. At this scale, option (b) typically costs less in total engineer-hours than maintaining option (a).
High complexity: Enterprise, 500K+ codes/month programmatically
You're a logistics company generating unique QR codes for every package label at 50 distribution centers. You need sub-100ms generation, 99.99% uptime, data residency in specific regions, and integration into your existing Java microservices stack. ZXing embedded in your Java services with a custom redirect infrastructure makes sense here. The volume and latency requirements justify the engineering investment. A third-party SaaS introduces a network dependency at every scan event.
When Self-Hosting a QR Platform Is NOT the Answer
Self-hosting gets oversold badly. Here are the situations where it costs more than it saves:
- You need editable destination URLs but don't have a backend team. A dynamic redirect service requires a database, a web server, and someone to maintain them. A SaaS platform handles this for $10-20/month — less than an hour of developer time.
- You want analytics (scan counts, location data, device type). Libraries output an image. Tracking requires server infrastructure that logs every scan. Building this from scratch is a 2-4 week project.
- You're a small business or marketer without in-house engineers. Open source tools assume you can read code, run a terminal, and manage dependencies. If that's not your team's skill set, the "free" option will cost you more in time.
- You have low volume (under 10,000 codes/month). The infrastructure cost of self-hosting a full QR platform exceeds the subscription cost of any commercial platform.
- You need reliability guarantees (uptime SLA, support). Self-hosted means self-supported. When your QR codes stop scanning at 3am, there's no support ticket to open.
How QR Nova Compares to Self-Hosting
QR Nova is not open source. Worth being upfront about that, especially in an article comparing open source tools. But it's relevant for teams evaluating whether to self-host or just use a managed service.
Static QR codes on QR Nova are free, never expire, require no account, and have no scan limits. This covers most low-complexity use cases that developers reach for python-qrcode or node-qrcode to solve — the difference is that QR Nova requires no code, no dependencies, and no deployment. If you need a quick open source QR code without any setup, QR Nova's free generator handles it in seconds.
For dynamic QR codes (editable destination, scan analytics, branded short domains), QR Nova offers paid plans with one key differentiator: no subscription auto-renewal trap. Unlike QR Tiger (which as of May 2026 caps free dynamic codes at 500 scans before requiring an upgrade) or Flowcode (30-day free trial that deactivates codes on expiry), QR Nova's pricing page shows flat costs without hidden caps. See the full comparison on the pricing page.
For developers who need programmatic generation at scale, the right answer is still a library like node-qrcode or python-qrcode. But for everything else — marketing teams, small businesses, anyone who needs editable codes without maintaining a server — QR Nova's free tier handles the majority of use cases that people mistakenly try to solve by self-hosting.
If you're comparing platforms, the comparison page covers QR Tiger, QR Code Monkey, Bitly, and Flowcode side by side against QR Nova on permanence, pricing, and feature limits.
Frequently asked questions
What is the best open source QR code generator library?
For Python, python-qrcode (MIT) is the most popular. For Node.js, node-qrcode (MIT) has 1M+ weekly downloads. For PHP/Symfony, endroid/qr-code (MIT) is the standard. For Java and Android, ZXing (Apache 2.0) handles both generation and decoding. The 'best' depends on your stack.
Is open source QR code generation really free to use in commercial projects?
MIT and Apache 2.0 libraries are free in commercial projects with no restrictions. AGPL-licensed tools are a different story — if you build a SaaS product on AGPL code, you may be required to open-source your entire application. Always check the license before building on top of any open source library.
What is the AGPL loophole and why does it matter for QR code SaaS?
Traditional GPL requires you to share source code when you distribute software. AGPL closes the 'SaaS loophole' — it requires you to share source even when users access the software over a network. For a QR code generation service, this means building on AGPL code could force you to open-source your product.
When should I self-host a QR code generator instead of using a SaaS platform?
Self-hosting makes sense when you have strict data residency requirements, generate millions of codes programmatically, need to embed generation into an existing app, or have a dedicated DevOps team to maintain the stack. It does NOT make sense for small businesses, marketing teams, or anyone who needs tracking, analytics, or editable redirect URLs.
Can I use node-qrcode or python-qrcode to create dynamic QR codes?
No. Open source generation libraries create static QR codes — the URL is baked into the image. Dynamic QR codes require a redirect infrastructure: a short URL service, a database, and a web server to handle redirects. Libraries like python-qrcode and node-qrcode output the image, not the redirect layer.
What is the difference between a QR code library and a QR code generator platform?
A library (python-qrcode, node-qrcode) is code you run yourself — it generates the image file and nothing else. A platform (QR Nova, QR Tiger) provides the full stack: image generation, a hosted redirect URL, a dashboard, analytics, and the ability to change the destination without reprinting. Libraries need a developer. Platforms need a browser.
Does ZXing generate QR codes or only read them?
ZXing does both. It is primarily known as a barcode scanning library (used in millions of Android apps), but it includes a QR code encoder as well. For pure generation use cases, lighter libraries like node-qrcode or python-qrcode are easier to work with.
Is QR Nova open source?
QR Nova is not open source, but unlike most paid QR platforms, it offers genuinely free static QR codes with no expiration, no sign-up, and no scan limits. Dynamic QR codes with redirect editing are available on paid plans with transparent pricing and no auto-renewing subscription traps.
Related articles
QR Code Generator Pricing 2026: 7 Tools Compared
QR code generator pricing compared: QR Tiger, Bitly, Flowcode, Uniqode & more. From $0 to $250+/mo — real costs, hidden fees, and one free option.
Flowcode vs QR Tiger: Honest Comparison (2026)
Flowcode vs QR Tiger compared on real pricing, free plan limits, and what happens when you cancel. Find the best Flowcode alternative in 2026.
Best Uniqode / Beaconstac Alternative in 2026
Uniqode (formerly Beaconstac) cancels your QR codes when you stop paying — scan limits apply even on paid plans. Best alternatives for every use case.
Start free — no subscription trap
Get started