Generators

QR Code Generator

Make a QR code for a link, text, email address, phone number or Wi-Fi network. Check the scan warnings, then download a PNG or a scalable SVG. The code is generated in your browser.

Guide: QR Code Error Correction, Size and Capacity Explained

Ready.

Exactly what the code contains

Checks

    What this tool does

    It turns content into a QR code you can download as a PNG or an SVG. Besides plain URLs and text it builds the standard formats for an email (mailto:), a phone number (tel:) and a Wi-Fi network, so a phone offers the right action when it scans the code. Below the code you can see the exact text it contains, plus checks for the things that most often make a printed code fail: low contrast, a missing quiet zone, content that makes the code too dense, and printing it too small.

    The encoder is written for this site and runs in your browser. It supports versions 1 to 40, the four error-correction levels, and the numeric, alphanumeric and byte (UTF-8) encoding modes, and it picks the smallest version that fits. It makes static codes: the content is fixed when you create the code and cannot be changed after it is printed.

    How a QR code works

    A QR code is a square grid of dark and light modules. Three large squares in the corners tell a camera where the code is and which way is up. Smaller alignment squares and a striped timing pattern help it correct for perspective in larger codes, and a strip of format information records the error-correction level and the mask. Your content is converted to bits, split into blocks and extended with Reed-Solomon error-correction codewords. The bits are then written into the remaining modules in a zigzag, and one of eight mask patterns is applied. The encoder chooses the mask with the best penalty score, which avoids large solid areas and patterns that look like the finder squares.

    The encoding mode decides how many bits each character costs. Digits are the cheapest, capital letters and a few symbols are next, and everything else (lowercase letters, accented and non-Latin text, emoji) is stored as UTF-8 bytes. That is why a code for a long number is much smaller than a code for a sentence of the same length.

    Error correctionNumeric (digits)AlphanumericByte (UTF-8)
    L (7%)708942962953
    M (15%)559633912331
    Q (25%)399324201663
    H (30%)305718521273

    The table shows the largest amount each level can hold at version 40 (177 by 177 modules). Codes anywhere near this size are very hard to scan in practice.

    Error correction levels

    The level says how much of the code can be damaged, dirty or hidden and still be read. The percentages are the approximate share of codewords that can be restored, not a promise about any particular scratch or smudge.

    • Low (7%) gives the smallest, simplest code. Use it for clean, short-lived uses such as a code on a screen.
    • Medium (15%) is the usual default for printed material.
    • Quartile (25%) and High (30%) suit codes that will be handled, outdoors, or partly covered. Each step makes the code denser, so the same content needs a larger print size.

    Higher error correction is not automatically better. Pick the lowest level that fits where the code will live, then test it. If a code becomes too dense to scan comfortably, lower the level or shorten the content.

    Size and scanning reliability

    • Quiet zone. The specification asks for a blank margin of 4 modules on every side. Cropping it into a busy background is a very common cause of codes that will not scan.
    • Contrast. A dark code on a light background is the safe choice. Inverted (light on dark) and low-contrast codes fail in many scanners. The tool warns about both.
    • Print size. A widely used rule of thumb is that the code should be about one tenth of the scanning distance in width, so a code scanned from 1 metre should be about 10 cm wide. Enter a printed width above to see the module size and distance for your code. Very small modules (under roughly 0.4 mm) are hard for many printers and cameras.
    • Screens. Use at least 4 pixels per module and avoid scaling the image by a fractional factor, which blurs the edges. SVG stays sharp at any size and is the better choice for print.
    • Density. Every extra character adds modules. A short URL scans from further away than a long one with tracking parameters. If a link is long, put a short redirect on a domain you control.

    Content types and examples

    These are the strings the tool writes for each type. They are shown here exactly as they are encoded, which is also what you see under the code.

    TypeEncoded contentNotes
    URLhttps://example.com/menu?table=12Include https://. Without a scheme many scanners show the text instead of opening it.
    Plain textTable 12: ready at 7 pmStored as UTF-8, so non-Latin text and emoji work in readers that expect UTF-8, which is nearly all modern phones.
    Emailmailto:hello@example.com?subject=Order%20question&body=Hi%2C%20I%20have%20a%20question%20about%20order%201042.Subject and message are percent-encoded.
    Phonetel:+923001234567Spaces and punctuation are removed. Include the country code.
    Wi-FiWIFI:T:WPA;S:Cafe Guest;P:pa\;ss\:word;;Backslash, semicolon, comma, colon and quote characters in the name and password are escaped with a backslash.

    Wi-Fi codes follow the format most phone cameras understand; support for unusual setups (enterprise networks, some WPA3-only networks) varies by device, so test with the devices you care about.

    Common mistakes

    • Printing without testing. Scan the final printed or on-screen version with at least two different phones.
    • Encoding a URL that contains spaces or unescaped special characters. Run query values through the URL Encoder / Decoder first, and check the structure with the URL Parser.
    • Putting a very long link or a whole paragraph into the code and then shrinking it onto a business card.
    • Saving the code as a JPEG or a low-quality WebP. Compression artefacts blur the module edges; keep PNG or SVG. If you have to optimise a page that contains the code, re-test it after using the Image Compressor.
    • Using a QR code for something that must change later. A static code cannot be edited. Point it at a URL you control, and change where that URL leads.
    • Trusting a code you did not make. A QR code hides its destination, so check where a scanned link goes before opening it.

    When not to over-customize

    Colors, rounded modules, gradients and a logo in the middle can make a code look branded, and each one removes some of the margin that error correction provides. A logo covers modules that the error correction then has to rebuild; colors that look fine on a screen can have poor contrast on a printer. This tool therefore offers only code and background colors, with a contrast warning, and no logo or module shapes. If you do design a branded code, use the highest error correction that keeps the code readable, keep the dark-on-light contrast, keep the three corner squares intact, and test it on several phones in the lighting where it will be used.

    Developer use cases

    • Embedding in a page or app. Copy SVG code gives you inline markup for HTML, a template or a design file. Copy PNG data URI gives a data:image/png;base64,... string for an <img src>; the Base64 Encoder & Decoder and Image to Base64 tool explain and convert the same format. Many email clients block SVG, so use a PNG there.
    • Documents and tickets. Download the SVG for print layouts and the PNG for slides or chat.
    • Device setup and testing. Wi-Fi, phone and email codes are quick ways to move a setting or a test address onto a phone without typing.
    • Checking what a code carries. The payload shown under the code lets you confirm the exact bytes before you print.

    Privacy and local processing

    This tool runs entirely in your browser. The code is calculated by JavaScript on this page and drawn on a canvas on your device, so what you enter, including a Wi-Fi password, is not sent to a server. Nothing you type is sent anywhere while you type or download. Remember that the code itself is not secret: anyone who can see the image can read its contents.

    Share this tool

    Your data is not included in this link.