QR Code Generator
Create QR codes instantly for any URL, text, or Wi-Fi network. Choose your error correction level and download the result as a high-resolution PNG — no account, no watermark, no data sent to any server.
How It Works
A QR code encodes data as a grid of dark and light square modules. Scanning the pattern with a phone camera decodes the embedded text or URL in milliseconds.
The encoding process works in five stages:
1. Mode selection. This tool uses byte mode, which encodes each character as its raw UTF-8 byte value. Byte mode supports all printable characters, emoji, and international text — far more flexible than the numeric or alphanumeric modes used for simple digit strings.
2. Data encoding. A mode indicator (0100 for byte mode) is written to a bit stream, followed by a character count and then each byte of the input. Terminator bits and padding codewords fill the remainder of the data capacity for the selected QR version.
3. Error correction. The data codewords are fed through Reed-Solomon error correction, which uses arithmetic over the Galois field GF(256). The resulting error correction codewords are interleaved with the data codewords so that burst errors (scratches, dirt) affect many small fragments rather than one large chunk.
4. Module placement. The combined codeword stream is written into the QR matrix in a diagonal zigzag pattern, column-pair by column-pair from right to left. Finder patterns (the three large squares in the corners) allow scanners to orient the code and calculate skew. Timing strips along row 6 and column 6 let the scanner measure module size. Alignment patterns appear in larger versions to compensate for image distortion.
5. Masking. Eight candidate mask patterns are applied to the data area, and each result is scored using four penalty rules that penalise long runs, dense blocks, and imbalanced dark-to-light ratios. The mask with the lowest penalty score is selected and the final format information (ECC level + mask number) is written into reserved areas near the finder patterns.
Worked example — encoding "Hello":
Input: 5 bytes (H=0x48, e=0x65, l=0x6C, l=0x6C, o=0x6F). With ECC level M, a version 1 code (21×21) can hold 16 data bytes — enough for this input. After Reed-Solomon, 10 error correction codewords are appended. The resulting 26 codewords are placed in the matrix, the best mask is applied, and the code can now be scanned.
Frequently Asked Questions
How much text can a QR code hold?
This generator supports up to roughly 100 characters for ECC level M using byte mode. Reducing to ECC level L increases capacity slightly; longer texts require a higher QR version (larger grid). For best scannability, keep URLs short or use a URL shortener.
What is error correction and which level should I choose?
Error correction lets a QR scanner recover data even when part of the code is damaged or obscured. Level L recovers up to 7% damage (good for clean digital displays), M recovers 15% (recommended default), Q recovers 25%, and H recovers 30% (best for printed codes that may get scratched or dirty). Higher levels make the code denser and harder to scan at small sizes.
How do I encode Wi-Fi credentials?
Switch to the Wi-Fi tab, enter your network name (SSID), password, and security type. The tool encodes them in the standard WIFI:T:WPA;S:name;P:password;; format that iOS and Android recognise natively — scanning the code connects the phone directly.
Is my data sent to a server?
No. All QR encoding happens entirely in your browser using JavaScript. Nothing is transmitted; your text, URLs, and Wi-Fi passwords never leave your device.
What size should I download for printing?
Choose 512 px for most printing needs. A 512 px PNG printed at 300 dpi gives a roughly 4 cm square — easy to scan at arm's length. For large-format printing (posters, banners), scale the PNG up in an image editor using nearest-neighbour interpolation to keep crisp edges.