QR Code Generator

The QR Code Generator creates scannable QR codes from URLs or text. Users can download the generated code as a PNG image for use in marketing materials, signage, or digital content, allowing for quick access to information.

S. Siddiqui

Edited by

S. SiddiquiFounder & Editor-in-Chief
Sources:MDN Web DocsW3CIETFUpdated May 2026

What Is the QR Code Generator?

A QR code (Quick Response code) is a two-dimensional barcode that can encode text, URLs, contact details, or other data in a format that any smartphone camera can scan and decode in seconds. This generator lets you type in a URL, piece of text, phone number, or any other string and immediately produce a scannable QR code that you can download and use wherever you need it.

QR codes are standardised under ISO/IEC 18004, the international specification that defines their encoding, error correction, and format rules. The standard has been around since 1994 and is mature enough that any modern QR reader can handle codes generated by any compliant tool, regardless of which app or device is used to scan them.

How to Use the QR Code Generator

  1. Type in or paste in the content you want to encode. This can be a URL, plain text, a phone number, an email address, or a vCard string for contact details.
  2. Choose the size of the output image in pixels. Larger codes are easier to scan from a distance.
  3. Select an error correction level. Higher levels make the code more resilient to damage or partial obscuring.
  4. Optionally add a foreground and background colour if you want the code to match a brand palette.
  5. Download the generated code as a PNG or SVG file, ready to use in print or digital materials.

What Can You Encode in a QR Code?

QR codes can carry several types of data, and the content format determines how the scanning app interprets the result. Here are the most common uses:

  • URLs: The most common use. Paste a web address and anyone who scans the code goes straight to that page. Keep URLs short where possible to reduce code density and improve scan reliability.
  • Plain text: The decoded text is displayed by the scanner app. Useful for instructions, codes, or short messages.
  • Email address: Format as mailto:address@example.com to prompt the scanning device to open an email compose window.
  • Phone number: Format as tel:+441234567890 to trigger a call prompt on the scanning device.
  • Wi-Fi credentials: A specific format lets scanning devices join a Wi-Fi network automatically without typing the password.
  • vCard contact details: A structured format for sharing contact information that scanning apps can import directly into the device's contacts.

Google's developer documentation on QR code infographics covers some of the technical parameters involved in generating codes programmatically if you need to set up QR generation as part of a larger application.

Error Correction Levels Explained

One of the most useful features of the QR code standard is built-in error correction, which allows the code to be scanned successfully even if part of it is damaged, dirty, or obscured. There are four levels:

Level Data Recovery Capability Best For
L (Low)Up to 7%Clean digital display environments
M (Medium)Up to 15%General purpose use
Q (Quartile)Up to 25%Industrial environments or codes with logos placed over them
H (High)Up to 30%Outdoor use, packaging, or heavily branded codes

In practice, higher error correction also means a denser, more complex code pattern. For most digital uses, Medium (M) is a sensible default. For printed materials that may get worn, torn, or stamped with a logo, Q or H is worth the additional density.

Tips for Generating Effective QR Codes

  • Keep your encoded URL as short as possible. Longer strings produce denser codes that are harder to scan, especially at smaller print sizes. Use a URL shortener if necessary.
  • Always test the code before printing or publishing at scale. Scan it with at least two different devices and apps to confirm it decodes correctly.
  • Maintain a quiet zone around the code. The QR standard requires a margin of at least four modules (the small squares in the pattern) on all sides to ensure reliable scanning.
  • If you are placing a logo over the centre of the code, use the H error correction level to compensate for the covered area.

Conclusion

QR codes are one of the most practical ways to bridge physical and digital content, whether you are directing people from a printed poster to a website, sharing Wi-Fi credentials at a venue, or distributing contact details. Type in your content, set the parameters, and download a production-ready code in seconds. For URL-based codes, combining this tool with a short, clean URL from the Slug Generator helps keep the code as simple and scannable as possible.

Last reviewed: May 31, 2026
Founder's Real-World Experience
S. Siddiqui

S. Siddiqui

Founder & Editor-in-Chief, YourToolsBase

Finding the right error correction level for a business card QR code

When I was designing a small run of business cards for YourToolsBase, I wanted a QR code that linked directly to the site. The design left a square roughly 18mm wide for the code, which is on the small side. My first attempt used the default low error correction level and it scanned fine on screen, but when I printed a test sheet and held a phone over it, two out of five scans failed at arm's length.

I went back and generated versions at each of the four error correction levels defined in ISO/IEC 18004, the QR code standard. Level L (7% correction) was the one that failed. Level M (15%) scanned every time at arm's length but looked busy at 18mm. Level Q (25%) added more redundancy but made the modules so small that a cheap printer struggled to resolve them cleanly. Level H (30%) was too dense for the size.

In practice, level M turned out to be the right pick for an 18mm printed code on a matte card. With that in mind I generated the final code at level M, added a 4-module quiet zone around it, and the printed cards scanned reliably across every phone I tested.

Reliable scan at 18mmLevel M chosen over L/Q/HTested on 6 different phones
Also used alongside: UUID Generator

Frequently Asked Questions

How much data can a QR code hold?
A QR code can hold up to around 4,296 alphanumeric characters or 7,089 numeric characters at maximum capacity. In practice, longer data strings produce denser, harder-to-scan codes. For reliable scanning across a range of devices and lighting conditions, keeping the encoded content to under 300 characters is a sensible guideline.
Do QR codes expire?
The QR code itself does not expire; it is just an encoding of data. However, if the code points to a URL and that URL stops working, the code effectively becomes non-functional. For long-lived applications like printed packaging or signage, consider using a redirect URL so you can update the destination without reprinting the code.
Can I customise the colours of a QR code?
Yes, as long as there is sufficient contrast between the foreground and background. Dark modules on a light background is the standard, but you can use brand colours as long as the contrast ratio is high enough for scanners to reliably distinguish the pattern. Avoid inverting to light on dark, as many scanners struggle with that combination.
What size should a printed QR code be?
A minimum of 2 cm by 2 cm (about 0.8 inches square) is recommended for codes scanned at arm's length. For posters or signs scanned from further away, scale the code up proportionally. As a general rule, the scanning distance should not exceed about 10 times the code's side length for reliable results.
Can I track how many times a QR code has been scanned?
Not with a static QR code alone. Static codes simply encode a URL or text; they have no tracking capability built in. To track scans, you need to use a URL that points to an analytics-enabled redirect service, or use a dynamic QR code platform that handles the redirect and logs scan events.
Is it safe to scan QR codes from unknown sources?
QR codes can encode malicious URLs just as easily as legitimate ones. Before scanning a code in a public space or on unfamiliar materials, it is worth checking whether the source is trustworthy. Most modern smartphone camera apps preview the encoded URL before opening it, giving you a chance to check the destination before proceeding.

Formula

Rate This Tool

Was this tool helpful?

Be the first to rate this tool

💡 Pro Tip

Use error correction level H (High, 30% recovery) when overlaying a logo on a QR code. Lower levels (L/M/Q) are fine for clean, unobstructed codes.

About the Author

S. Siddiqui

S. Siddiqui

Founder & Editor-in-Chief

LinkedIn Profile

S. Siddiqui is the founder and editor-in-chief of YourToolsBase, overseeing all content, tool accuracy, and editorial standards.

View full profile

Authoritative Sources

Formulas and data in this tool are based on guidelines from the above sources.