qrcode

QR code generator for Node.js and browsers. Generates QR codes as PNG images (via Canvas), SVG strings, terminal ASCII art, or data URLs. Supports all QR code error correction levels (L/M/Q/H), custom color schemes, and character encoding options. Async and sync APIs. Used for generating authentication QR codes (TOTP/2FA), payment QR codes, product links, WiFi credentials, and contact vCards.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools qrcode qr barcode image svg canvas node browser typescript
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
96
/ 100
Is it safe for agents?
⚡ Reliability
90
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
100
Auth Strength
100
Scope Granularity
100
Dep. Hygiene
88
Secret Handling
90

QR code generation library — no network surface. QR codes encoding secrets (TOTP keys) should only be shown once and never logged or stored as images.

⚡ Reliability

Uptime/SLA
92
Version Stability
90
Breaking Changes
90
Error Recovery
90
AF Security Reliability

Best When

You need to generate standard QR codes as images, SVG, or data URLs in Node.js or browser applications.

Avoid When

You need to scan/decode QR codes (use jsQR), need other barcode formats (use JsBarcode), or need highly customized QR code designs.

Use Cases

  • Generate QR codes for TOTP two-factor authentication setup (authenticator app enrollment)
  • Create QR codes for payment links, product URLs, or marketing materials as PNG or SVG
  • Generate WiFi credential QR codes that users can scan to auto-connect to a network
  • Embed QR codes in server-generated PDFs, invoices, or tickets using the data URL or buffer output
  • Display QR codes in browser applications for sharing URLs, contact info, or app deep links

Not For

  • QR code scanning/reading — qrcode generates only; use jsQR or ZXing for QR code decoding
  • Barcodes other than QR (EAN, Code 128, etc.) — use JsBarcode for other barcode formats
  • Custom QR code designs (logo overlays, colors) — basic color support exists but use dedicated QR design libraries for styled QR codes

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No authentication — image generation library.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Fully free, MIT licensed.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • QR code capacity is limited by error correction level and version — higher error correction (H) = less data capacity; lower the correction level if input is too long
  • PNG output in Node.js requires canvas package which has native dependencies — if canvas install fails, use SVG output instead (no native deps)
  • toDataURL() is async but toFile() is also async — must await both; mixing sync and async QR API calls is a common source of bugs
  • URL encoding: special characters in URLs (spaces, Unicode) should be URL-encoded before creating QR codes for maximum scanner compatibility
  • QR code size: default module size may be too small to scan; use scale option to increase size: QRCode.toDataURL(text, { scale: 10 })
  • Version and mode auto-selection: library auto-selects optimal QR version and encoding mode; override with version and mode options only if specific QR parameters are required

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for qrcode.

$99

Scores are editorial opinions as of 2026-03-06.

5208
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered