QR Code Generator
Create QR codes for URLs, text, email, phone numbers, WiFi, and contact cards. Customize and download instantly.
What Are QR Codes and How Do They Work?
QR code stands for Quick Response code. Invented in 1994 by Masahiro Hara at Denso Wave, a Toyota subsidiary, QR codes were originally designed to track automotive parts on assembly lines. They replaced the linear barcode (which could store roughly 20 characters) with a two-dimensional matrix that can encode thousands of characters while still being readable at high speed, even when partially damaged or printed at an angle.
A QR code stores data as a pattern of dark and light squares arranged in a grid. A smartphone camera (or any QR scanner) captures an image of the code, identifies the three distinctive finder patterns in the corners, and uses them to determine the code's orientation and size. It then reads the module pattern, applies error correction to recover any missing data, and decodes the binary data back into text, a URL, or other content types.
The Structure of a QR Code
Every QR code contains several functional regions:
- Finder patterns: The three square markers in the top-left, top-right, and bottom-left corners. These allow scanners to locate and orient the code regardless of how it is positioned or tilted.
- Alignment patterns: Smaller squares that appear in larger QR codes to help correct for image distortion (e.g., if the code is on a curved surface).
- Timing patterns: Alternating black and white modules along the edges that help determine the coordinate system within the code.
- Format information: Encodes the error correction level and mask pattern used, repeated twice for redundancy.
- Data and error correction modules: The bulk of the code. Data is encoded in binary, interleaved with error correction codewords that allow the code to be read even if damaged.
- Quiet zone: A white margin around the entire code that helps scanners distinguish the code from surrounding content. Minimum four modules wide.
Error Correction Levels
One of QR code's most powerful features is built-in error correction. Even if part of the code is damaged, obscured, or dirty, the scanner can still reconstruct the full data. There are four error correction levels, each providing a different trade-off between data capacity and damage tolerance:
L
Low (~7% recovery)
Maximum data capacity. Use when the code will always be printed cleanly and never damaged or obscured.
M
Medium (~15% recovery)
Good balance for most use cases. The default for most QR generators. Handles minor scratches or printing imperfections.
Q
Quartile (~25% recovery)
Used in industrial environments where codes may get dirty. Also allows adding a logo or image over up to 25% of the code.
H
High (~30% recovery)
Maximum redundancy. Required when embedding logos. Produces a denser, more complex pattern that requires careful printing at small sizes.
Content Types and When to Use Each
QR codes can encode any text, but certain conventions make the content machine-actionable rather than just human-readable. Smartphones recognize these formats and offer contextual actions:
- URL: The most common type. Prefix with https:// to ensure phones open a browser automatically rather than treating it as a search query. Use a URL shortener if your URL is very long — shorter URLs mean less complex QR codes and easier scanning.
- Email (mailto:): Encodes as mailto:address?subject=...&body=... The phone's mail app opens pre-filled. Useful on business cards, event materials, or support pages to pre-populate a support request form.
- Phone (tel:): Opens the phone dialer pre-filled with the number. Uses the tel: URI scheme. Strip all formatting characters — just use + and digits.
- WiFi (WIFI:): Allows guests to connect to a network without seeing or typing the password. Format: WIFI:T:WPA;S:NetworkName;P:password;; The double semicolon is required as a terminator. SSID and password values containing special characters (semicolons, backslashes, or quotes) must be escaped with a backslash.
- vCard: Encodes a digital business card in the vCard 3.0 format. When scanned, the phone offers to add the contact to the address book. Ideal for physical business cards, conference badges, or email signatures.
Best Practices for QR Code Design and Deployment
A QR code that cannot be scanned is useless, and there are many ways to inadvertently create unreadable codes:
- Minimum print size: At least 2cm × 2cm (about 0.8 inches) for short-range scanning (phone held 10–20cm away). For large-format printing viewed from a distance (posters, billboards), scale proportionally — a code on a billboard 5 meters away needs to be at least 40cm × 40cm.
- Contrast is critical: The scanner relies on high contrast between dark and light modules. Black on white is optimal. Dark blue on white also works well. Avoid light colors on white or patterned backgrounds behind the code.
- Don't invert colors unless you test it: Some decoders handle light-on-dark codes, but many do not. If you use a white foreground on a dark background, test thoroughly on multiple devices.
- Test before printing at scale: Always scan your generated code with at least two different smartphones before committing to a print run. The Android camera app, iOS camera app, and dedicated QR apps all use slightly different decoders.
- Use static codes for permanent use: The code generated here encodes the content directly and permanently. If you need to change the destination without reprinting (e.g., for marketing campaigns), use a QR redirector service that encodes a short URL which you can retarget at any time.
- Add a call to action: QR codes are not yet universally understood by all demographics. Adding text below the code like "Scan to visit our menu" or "Scan to connect" increases scan rates significantly.
PNG vs. SVG: Which Format to Use
This generator offers two download formats. Choosing the right one matters for your use case:
PNG is a raster format — the image is made of pixels. It is immediately usable in any context: web pages, email, Word documents, PowerPoint, and most design tools. The limitation is that enlarging a PNG beyond its original resolution makes it blurry. Download at the highest size you need (use the size slider) and never upscale afterward. For digital-only use (websites, apps, emails), PNG is almost always the right choice.
SVG is a vector format — the image is defined mathematically and can be scaled to any size without quality loss. This makes it the correct choice for any print use case: business cards, brochures, packaging, signage. Hand the SVG to a printer or paste it into Illustrator, Figma, or Inkscape. SVG files are also smaller in file size for complex graphics and can be styled with CSS.
Can I add a logo to the center of my QR code?
Yes, but with important caveats. A logo placed in the center of a QR code intentionally covers part of the data region. This works because QR codes include error correction that allows up to 30% of modules to be obscured (at the H error correction level) without losing decodability. To add a logo safely: download the SVG or PNG from this tool, then overlay a logo in a design application like Figma, Illustrator, or Canva over the center. Keep the logo under 25–30% of the total code area. Always re-test the code with a scanner after adding the logo — an oversized logo will prevent scanning.
Do QR codes expire?
A static QR code (like the ones generated here) encodes content directly and never expires — it will work as long as the destination still exists. If you encode a URL that later returns a 404 error, the QR code still scans but leads to a dead page. If you encode contact information or WiFi credentials that change, the code becomes outdated. Some commercial QR code services offer "dynamic" codes that encode a short tracking URL redirecting to a destination you can change at any time. These are useful for marketing materials but require an ongoing subscription to the service to remain active.
How much text can a QR code hold?
Capacity depends on the QR version (1–40, where higher versions have more modules) and error correction level. At the highest version and lowest error correction (L): up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data. At medium error correction (M, the default here): up to 4,296 numeric, 2,953 alphanumeric, or 1,817 binary characters. In practice, longer content produces larger, denser QR codes with more modules — which require higher-resolution printing and closer scanning distances. For URLs, keep them under 100 characters when possible. Use a URL shortener for long links.
Is it safe to scan a QR code?
The QR code itself is just data — scanning one does not directly harm your device. The risk comes from the content it encodes. A malicious QR code can point to a phishing website, trigger an automatic app download, send a pre-written text message, or initiate a phone call. To stay safe: be suspicious of QR codes in unexpected places (stickers placed over legitimate codes, codes in unsolicited emails, or codes on parking meters). Before tapping a scanned URL, check your phone's preview of the URL for obvious red flags like unusual domains or long obfuscated strings. In high-risk environments (financial, healthcare), avoid scanning codes from untrusted sources.
Why won't my QR code scan?
Common causes: (1) Low contrast — the foreground and background colors are too similar; restore to black on white and test again. (2) Too small — the code is printed below the minimum readable size; increase the print size. (3) Damaged or distorted — part of the code is obscured, the paper is crumpled, or the printed image is blurry; reprint at higher resolution. (4) Missing quiet zone — the white border around the code has been cropped; ensure at least 4 modules of white space on all sides. (5) Color inversion — some decoders cannot read light-on-dark codes. (6) The encoded URL no longer works — the code scans successfully but the phone shows an error because the website is down or the URL changed.