QR Code Generator

Generate QR codes from any text or URL. Customize colors, size, and error correction — download as PNG or SVG. All processing in your browser.

Text / URL
Size
Error correction
Preview

Did this tool solve your problem?

What is a QR code

A QR code (Quick Response Code) is a 2D barcode invented by Denso Wave in 1994 that can store numeric, alphanumeric, binary, and Kanji data. Compared to traditional barcodes, QR codes hold much more data (up to 7089 digits), can be scanned from any angle, and include error correction that allows reading even when partially damaged.

QR code use cases

Mobile payments (WeChat Pay, Alipay), website link sharing (much faster than typing URLs), business card exchange (vCard), WiFi password sharing, product tracking and anti-counterfeiting, e-tickets (movie tickets, boarding passes), and offline-to-online marketing (scan posters to follow social accounts). QR codes bridge the physical and digital worlds.

Generate QR Codes in Code

JavaScript
// Generate QR code with qrcode library
import QRCode from 'qrcode';

// To canvas
await QRCode.toCanvas(canvasEl, 'https://deepinto.top', {
  width: 256,
  margin: 2,
  color: { dark: '#000000', light: '#ffffff' },
  errorCorrectionLevel: 'M',
});

// To data URL
const dataUrl = await QRCode.toDataURL('Hello World');
// Use as <img src={dataUrl} />

// To SVG string
const svg = await QRCode.toString('Hello', { type: 'svg' });
Python
# pip install qrcode[pil]
import qrcode

qr = qrcode.QRCode(
    version=1,
    error_correction=qrcode.constants.ERROR_CORRECT_H,
    box_size=10,
    border=2,
)
qr.add_data('https://deepinto.top')
qr.make(fit=True)

img = qr.make_image(fill_color="black", back_color="white")
img.save("qrcode.png")

Frequently Asked Questions

What is QR code error correction level?
Error correction determines how much of the QR code can be damaged and still scannable. Level L (7%) is minimum, Level H (30%) is strongest. If the code will be printed or may get partially obscured, use Q or H level. Higher levels create denser patterns.
How much text can a QR code hold?
Maximum capacity depends on error correction level and character type. Up to 7089 numeric characters, 4296 alphanumeric characters, or 2953 bytes of binary/Chinese text. The tool will show an error if you exceed the limit.
Is QR code generation secure?
All QR codes are generated entirely in your browser using the Canvas API. Data is never uploaded to any server. You can safely use this tool offline.
What's the difference between PNG and SVG?
PNG is a raster format that blurs when scaled up — ideal for screen display and social sharing. SVG is vector-based and scales infinitely without quality loss — ideal for printing and high-resolution use. Use SVG for print.
Can I add a custom logo?
Logo embedding isn't supported yet, but you can use H-level error correction (30% tolerance) and overlay your logo in the center using an image editor. H-level allows up to 30% area obstruction while remaining scannable.
Why won't my QR code scan?
Common causes: low contrast between foreground/background (use black on white), too small or low resolution, low error correction level (L), or data exceeding capacity. Try increasing size or error correction level.