QR Code Generator — URLs, Text, WiFi, Email
Quick Answer
A QR (Quick Response) code is a 2D barcode that stores up to 4,296 alphanumeric characters, readable by any modern smartphone camera. QR codes were invented by Denso Wave in 1994 and standardized as ISO/IEC 18004.
Also searched as: free qr generator, qr maker, wifi qr code, vcard qr generator
How QR Codes Work
A QR code is a two-dimensional matrix symbology that encodes data as a grid of black and white squares called modules. The pattern is read by a camera, which locates the three large finder squares in the corners, decodes the version and format info, and then walks the data region extracting bits that are mapped back to the original text or bytes. The complete specification is published as ISO/IEC 18004:2015, and Denso Wave, the inventor, keeps the basic patent royalty-free, which is why QR codes spread so widely. A QR code symbol ranges in size from Version 1 (21 by 21 modules, up to 25 alphanumeric characters) to Version 40 (177 by 177 modules, up to 4,296 alphanumeric characters). Every symbol includes position-detection patterns, timing patterns, format information, and Reed-Solomon error correction so it can survive partial damage. For other tools in this category see our UUID generator and password generator.
The QR Encoding Process
Encoding a QR code follows six well-defined steps per ISO/IEC 18004. First, the encoder selects a mode (numeric, alphanumeric, byte, or Kanji) based on the character set in the input, because each mode packs bits differently; numeric mode uses 3.33 bits per digit, while byte mode uses 8 bits per character. Second, the encoder picks the smallest version that can hold the data at the chosen error correction level. Third, the data is converted to a bit stream, prefixed with a mode indicator and character count, and padded to the exact capacity. Fourth, Reed-Solomon error correction codewords are calculated and appended. Fifth, data and EC codewords are interleaved and placed on the module grid following a fixed walking pattern that skips the finder, alignment, and timing patterns. Sixth, one of eight masking patterns is applied to minimize long runs of the same color, and the format information is written. A worked example: the URL https://example.com is 19 bytes, which fits in a Version 2 symbol (25x25) at error correction level M.
Key Terms You Should Know
Module: a single black or white square, the smallest unit of a QR code. Version: a number from 1 to 40 that determines the grid size in modules; each version adds 4 modules on each side. Error correction level: L, M, Q, or H, indicating how much of the symbol can be damaged before it stops decoding. Finder pattern: the three concentric square markers in the top-left, top-right, and bottom-left corners that scanners use to locate and orient the code. Alignment pattern: smaller concentric squares added on Version 2 and above to correct for perspective distortion. Mask pattern: one of eight XOR patterns applied to the data bits to avoid confusing scanners with large solid areas. Quiet zone: the four-module-wide white border required around the symbol so scanners can separate it from the background.
QR Code Capacity by Version — Reference Data
Different versions of QR codes store very different amounts of data. The table below shows the alphanumeric and byte capacities for several common versions at error correction level M, as specified in ISO/IEC 18004 Annex E. Note how the capacity scales roughly quadratically with version number, but so does the printed size, so short text is better served by a small version. When generating a QR code for a printed flyer, most designers pick a version under 10 (57x57 modules) so the code remains easy to scan at normal distances. Version 40, the maximum, is rarely used because it requires a resolution-intensive image and a longer scan time.
| Version | Modules | Alphanum (M) | Bytes (M) | Typical use |
|---|---|---|---|---|
| 1 | 21x21 | 20 | 14 | Short code |
| 3 | 29x29 | 67 | 47 | Short URL |
| 5 | 37x37 | 154 | 106 | Product URL |
| 10 | 57x57 | 513 | 352 | Long URL / vCard |
| 20 | 97x97 | 1,663 | 1,142 | Large text block |
| 40 | 177x177 | 4,296 | 2,953 | Maximum capacity |
Practical Examples
Example 1 — Restaurant menu: A cafe prints a QR code on every table that points to https://cafe.example/menu.pdf. Even with error correction level M, this 32-byte URL fits in a Version 3 symbol (29x29), which scans reliably from 60 cm away at a printed size of 25 mm. Example 2 — WiFi sharing: A hotel generates a WiFi QR code for its guest network. The encoded text is WIFI:T:WPA;S:Hotel_Guest;P:Welcome2024;;, which is 32 characters and fits in a Version 2 symbol. Guests scan the printed card, and their phone offers a one-tap connect button. Example 3 — Event ticket: A conference issues QR code tickets with a 36-character UUID as the ticket ID. The scanner at the door reads the ID in under 200 ms and checks it against the registration database, which handles 1,200 check-ins per hour per lane according to Eventbrite's 2023 operations data.
Tips and Best Practices
Keep URLs short: a shorter URL produces a smaller version, which is easier to scan and faster to decode; use a URL shortener or a branded redirect if possible. Test on multiple phones: iOS and Android handle low contrast and small sizes differently, so scan the printed output on both platforms before going to production. Maintain the quiet zone: always leave at least four modules of white space around the code; placing the symbol flush against a border is the number-one cause of scan failures. Raise the error correction level for printed media: ink bleed, smudging, and paper folds damage QR codes, so print at level Q or H. Pick dark on light: QR scanners expect dark modules on a lighter background; inverted codes fail on older scanner apps. Avoid tiny logos over finder patterns: the three corner markers must remain completely visible or decoding will fail. Print at 1 mm per module minimum: scanners need at least 2 camera pixels per module, so a 25x25 Version 2 symbol should be at least 25 mm across for reliable scanning from a phone at arm's length.
Frequently Asked Questions
What is a QR code?
A QR code (Quick Response code) is a two-dimensional matrix barcode invented by Denso Wave in 1994 for tracking car parts on a Toyota assembly line. It stores data in a pattern of black and white squares called modules, arranged on a grid of 21 by 21 up to 177 by 177 modules depending on the version. A single QR code can encode up to 4,296 alphanumeric characters, 7,089 numeric digits, or 2,953 bytes of binary data. QR codes are standardized internationally as ISO/IEC 18004 and are readable by any modern smartphone camera.
What is the maximum amount of data a QR code can hold?
The largest QR code, Version 40 at 177 by 177 modules with error correction level L, can store 7,089 numeric digits, 4,296 alphanumeric characters, 2,953 bytes of binary data, or 1,817 Kanji characters, according to ISO/IEC 18004. Higher error correction levels reduce capacity; Level H (30 percent recovery) drops the alphanumeric limit to 1,852 characters. In practice, most QR codes carry short URLs of 30 to 100 characters, which fit comfortably in a small Version 2 or 3 symbol and scan reliably even at low resolutions.
What are the QR code error correction levels?
QR codes use Reed-Solomon error correction at four selectable levels: L recovers up to 7 percent of damaged modules, M recovers 15 percent, Q recovers 25 percent, and H recovers 30 percent. Higher levels add redundancy, which makes the QR code scan even when stained, scratched, or partially obscured by a logo, but at the cost of lower data capacity. Most marketing use cases pick level M as a balance; QR codes with a printed logo in the center should use level H to compensate for the covered modules.
How do I create a WiFi QR code?
A WiFi QR code encodes network credentials in the text format WIFI:T:WPA;S:NetworkName;P:password;;. The T field specifies the authentication type (WPA, WEP, or nopass), S is the SSID, and P is the password. When a modern iOS or Android phone scans this code, it offers a one-tap button to join the network. This generator builds the string automatically when you select the WiFi type, which means you do not need to remember the syntax. The format was documented by the Wi-Fi Alliance and is supported natively since iOS 11 and Android 10.
Do QR codes expire?
No, a static QR code never expires because it contains the data directly; as long as the printed or displayed image is intact and the target URL still works, the code is valid forever. Dynamic QR codes, which redirect through a short link owned by a third party, can expire if the redirect service shuts down or requires a subscription. To guarantee long life, generate a static QR code that points straight at your own domain. This generator creates only static QR codes, so the output is yours to keep.
Can I put a logo in the middle of a QR code?
Yes, QR codes tolerate a small overlay in the center because of their built-in Reed-Solomon error correction. A logo covering up to about 25 percent of the total area can be masked over the code when the error correction level is set to H (30 percent), keeping it scannable. Denso Wave's original paper on QR codes notes that the fixed position and alignment patterns must remain visible; the logo should cover only the data region. Always test the final design with several different phones before printing at scale.