QR CODE GENERATOR

Turn a link, a phone number or a paragraph of text into a QR code you can download as a PNG or an SVG. It is built here, in your browser — nothing you type is uploaded, and there is no sign-up, no watermark and no expiry.

How this works: the encoder is on this page, not on a server

Every QR code is the same piece of maths from the ISO/IEC 18004 standard. Rather than ship a third-party library or post your text to an API, this page carries its own encoder: byte mode, versions 1 to 40, all four error-correction levels, Reed-Solomon error correction and the standard's four mask-penalty rules, in plain JavaScript.

Why bother? Because a QR code generator is usually the place you paste a link you would rather not hand to a stranger — a private document, a Wi-Fi password, an unlisted URL. Here the code is assembled on your machine and drawn on a canvas, so what leaves the page is nothing at all. The trade-off, stated plainly: the text is encoded as bytes, which is the right mode for links and normal prose, so we do not squeeze in extra characters with the numeric or alphanumeric modes — a code for a long run of digits ends up slightly larger than a commercial generator would make it.

Type or paste something to generate a code.

Your QR code will appear here.

Before you print or share it

    How to make a QR code

    1. Type or paste the content. A link, some text, a phone number — anything. The code updates as you type, so there is nothing to submit.
    2. Pick an error-correction level. M (about 15% recoverable) is the default and the right answer for most codes. Use Q or H when the code is going somewhere rough: a printed flyer, a sticker, a surface where a logo or a shadow will sit over part of it.
    3. Choose a pixel size. This is how many pixels each module gets in the downloaded PNG. 8 px is a good default; go bigger for print, smaller for a small on-screen badge.
    4. Leave the quiet zone alone unless you have a reason. Four modules of blank border is the standard minimum. Zero looks tidy in a design mock-up and fails on real cameras.
    5. Download. PNG for chat, documents and web pages; SVG when it will be printed, enlarged or edited as vector art. The image is generated in the browser from the canvas — nothing is uploaded, and the code never expires because it was never a short-link in disguise.

    Worked example. For https://2re.club/tools/qrcode/ (30 characters, 30 bytes) at the default level M, the encoder picks version 3 — a 29 × 29 grid — and then tests all eight mask patterns, keeping the one with the lowest penalty score. The panel beside the preview reports exactly that: version, module count, level, bytes used out of the version's capacity, the mask it settled on, and the finished image size at your current pixel setting.

    Change the level to H with the same link and it moves to a larger version: the same 30 bytes now need more error-correction codewords, so there is less room for data. That trade — damage tolerance against size — is the whole of the level setting.

    What the result means

    The panel under the preview is not decoration; each figure tells you something about how the code will behave in the real world.

    FigureWhat it tells you
    VersionThe size class of the code, 1 to 40. Version 1 is the smallest grid at 21 × 21 modules; version 40 is the densest at 177 × 177. The encoder picks the smallest one your payload fits into at your level, and the version is recorded in the code itself — that is why a scanner reads any of them without being told which it is looking at.
    ModulesThe grid, in modules (the little black and white squares). More modules means more information, but also smaller squares on the same piece of paper, so a dense code needs a bigger print or a closer camera.
    Error correctionL, M, Q or H. Each step adds more error-correction codewords, so roughly 7%, 15%, 25% or 30% of the code can be damaged, smudged or covered and the data still recovered. That is why a QR code still scans with a logo printed over the middle of it.
    PayloadHow many bytes your text became (UTF-8, so accented letters and emoji count for more than one) out of the capacity of the chosen version at the chosen level. Close to the limit means a big code; far from it means the code was padded, and you could afford a higher error-correction level at no extra size.
    Mask patternOne of eight scrambling patterns, applied to every data module so the finished grid avoids large blocks of one colour and accidental finder-like shapes that confuse scanners. The encoder scores all eight with the standard's four penalty rules and keeps the best; the choice is written into the format information.
    Image sizeModules × pixel size, plus the quiet zone on both sides. This is the actual pixel dimension of the PNG you download.

    Two practical notes while you are looking at those numbers. First, the quiet zone is part of the code, not padding: scanners use the blank margin to find where the code begins, so a QR code cropped flush to its edge by a design tool is a common reason one will not read. Second, contrast beats colour: dark modules on a light background is the assumption baked into every scanner, and while most current phones cope with inverted colours, some do not — the page flags it if you invert them. It also flags a very low contrast ratio between the two colours you chose, before you download anything.

    What this tool will not do

    Honesty about limits saves everyone time. This generator does not shorten links, host anything, count scans or expire — there is no server in the middle, so there is nothing to expire. The QR code contains exactly the text you typed: a link inside it keeps working for exactly as long as the link itself does, and nothing about the scan can be traced back to this page. The maximum payload is 2,953 bytes at level L and 1,273 bytes at level H, and past that the page says so rather than producing a code that would never scan. The text is encoded in byte mode, which is the right mode for links and prose; it is not additionally packed for numeric-only payloads, so a code for a very long run of digits comes out a size or two larger than a generator that switches modes would produce.

    Frequently asked questions

    No. The encoder is JavaScript vendored with the page (no CDN, no library fetched at run time) and it runs in your browser. Your text is not posted to the server, not logged and not stored — the only requests this page makes are for its own files and the ad script.

    It sets how much of the code can be damaged or covered and still read: roughly 7% of it at L, 15% at M, 25% at Q and 30% at H. The cost is capacity — the same text needs a bigger, denser code at H than at L. M is the sensible default; use Q or H for codes that get printed, folded, or labelled over.

    Two things sit around the modules: each module is drawn at a whole number of pixels (the pixel-size slider), and the quiet zone — the blank border scanners need — adds margin modules on every side. A version 1 code is 21 × 21 modules; at 8 px per module with the standard four-module margin the image is 232 × 232 pixels.

    Use the PNG for chat messages, documents and anything that expects a picture, and the SVG when it will be printed or scaled: SVG is vector, so it stays sharp at any size and the file is usually smaller than a high-resolution PNG. Both come from the same modules, generated in your browser.

    The usual causes, in order: too little contrast between the modules and the background; inverted colours (light modules on a dark background); no quiet zone because the margin was set to zero; a dense code (version 20 and up) photographed from too far away; and glare or a curved surface. The warnings under the preview appear as you change the settings, so you can see them before you download anything.

    Yes — a QR code is just text, and those are text formats. Wi-Fi is WIFI:T:WPA;S:NetworkName;P:password;; and a contact card is vCard syntax (BEGIN:VCARD … END:VCARD). This tool does not build those strings for you, but the example chips above the input paste one in so you can see the shape of it.

    Privacy: this tool runs entirely in your browser and makes no network requests of its own. Nothing you type is sent to us or to anyone else — see the privacy page for the site-wide details, including the ad script.

    Related tools

    Long URL with spaces, accents or an ampersand? Encode it first, then turn it into a code.

    Pick a module colour that still has enough contrast against the background to scan.

    Checking the link you are about to put in a code? See how it previews once someone scans it.