{ }DevToolBox

QR Code Generator

Generate QR codes from any text, URL, or data instantly in your browser. Download as SVG or PNG with selectable error correction levels.

QR Code Generator

0 / ~210 characters (byte mode, up to version 10)

What Is a QR Code?

A QR code (Quick Response code) is a two-dimensional barcode that stores data in a grid of black and white squares called modules. Invented in 1994 by Denso Wave, a subsidiary of Toyota, QR codes were originally designed to track automotive parts on assembly lines. Today, they are ubiquitous — used for everything from restaurant menus and payment systems to boarding passes and marketing campaigns.

Unlike traditional one-dimensional barcodes that store data in a single direction, QR codes encode data both horizontally and vertically. This allows them to store significantly more information in a smaller area. A single QR code can hold up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data.

How QR Codes Work

A QR code encodes data through several layers of processing:

QR Code Versions and Capacity

QR codes come in 40 versions, numbered 1 through 40. Each version adds four modules per side to the matrix: version 1 is 21×21 modules, version 2 is 25×25, and version 40 is 177×177. Higher versions can store more data but produce larger, denser codes.

For most practical purposes (URLs, short text, contact information), versions 1-10 are sufficient. This tool supports versions 1-10, which can encode up to approximately 271 bytes of data at the lowest error correction level. That is enough for virtually any URL, Wi-Fi configuration, or short text message.

The version is automatically selected based on the data length and error correction level. The encoder always chooses the smallest version that can accommodate the data, keeping the QR code as compact as possible.

Error Correction Levels Explained

QR codes use Reed-Solomon error correction to recover data even when parts of the code are damaged. There are four error correction levels:

Higher error correction levels consume more of the code’s capacity for redundancy, leaving less room for actual data. For the same data, a QR code with level H will be larger (higher version) than one with level L.

QR Codes in Marketing and Payments

QR codes have become a cornerstone of modern marketing and payment systems. Their ability to bridge the physical and digital worlds makes them invaluable:

QR Code Security Considerations

While QR codes themselves are simply data containers, they introduce security risks that users and businesses should be aware of:

Best practices for QR code security: use a scanner that previews the URL before opening it, avoid scanning codes from untrusted sources, and if you generate QR codes for your business, use HTTPS URLs and monitor for unauthorized modifications.

Dynamic vs. Static QR Codes

QR codes fall into two categories based on how their destination is managed:

For most developer and personal use cases, static QR codes are sufficient. Dynamic codes are valuable for marketing campaigns where you need to update destinations or track engagement metrics.

QR Code Design Best Practices

To create QR codes that scan reliably across devices:

How This Tool Works

This QR code generator runs entirely in your browser. No data is sent to any server. The QR code is generated using a pure JavaScript implementation of the QR code specification:

  1. Your input text is encoded in byte mode (UTF-8), which supports any character including Unicode.
  2. The smallest QR code version (1-10) that can hold your data at the selected error correction level is automatically chosen.
  3. Reed-Solomon error correction codewords are computed and interleaved with the data codewords.
  4. The data is placed into the QR matrix alongside finder patterns, timing patterns, and alignment patterns.
  5. All eight mask patterns are evaluated, and the one with the lowest penalty score (most scannable) is selected.
  6. The result is rendered as an SVG image, which can be downloaded directly or converted to PNG via the HTML5 Canvas API.

Frequently Asked Questions

Is this tool free to use?

Yes, completely free with no limits. The QR code is generated in your browser — no server processing, no account required, no watermarks.

Can I use the generated QR codes commercially?

Yes. QR codes are an open standard (ISO/IEC 18004). The codes generated by this tool are yours to use for any purpose — personal, commercial, or otherwise.

What is the maximum data I can encode?

This tool supports QR code versions 1-10. The maximum capacity depends on the error correction level: approximately 271 bytes with level L, 213 bytes with level M, 151 bytes with level Q, or 119 bytes with level H. This is sufficient for virtually any URL or short text.

Should I choose SVG or PNG for download?

SVG is vector-based and can be scaled to any size without losing quality. It is ideal for print media, signage, and any use case where you might resize the code. PNG is a raster format suitable for digital use at the specific resolution you generate. For maximum flexibility, download the SVG.

Which error correction level should I use?

For most digital use cases, M (Medium, 15%) is the best default. Use H (High, 30%) if you plan to add a logo over the code or if the code will be printed in environments where it might get damaged. Use L (Low, 7%) only when you need to minimize the QR code size and the code will be displayed on a clean digital screen.

Related Tools