Skip to content

QR Code Generator

Options

QR code

Generating…

Estimates for educational purposes — not financial, medical, or legal advice. See terms.

QR codes turn data into a 2D barcode that any phone camera can scan. The data is most often a URL (so the phone opens the page), but the format also handles plain text, contact cards (vCard), wifi credentials, payment information, and arbitrary binary. This tool generates the standard QR code variants in your browser — type or paste, see the result, download.

The encoding uses the standard qrcode library, which implements the ISO/IEC 18004 specification (the same standard every QR scanner reads). Output is a PNG data URL for screen use and an SVG for vector / print use, both downloadable.

How QR encoding works

A QR code is a grid of black and white modules (“dots”) arranged in a square. The grid size is the version (1-40), and each version holds a known amount of data: version 1 is 21×21 modules holding ~25 alphanumeric characters; version 40 is 177×177 modules holding ~2,953. The generator picks the smallest version that fits your input plus the chosen error-correction overhead.

Error correction lets a damaged code still scan. The four levels (L 7%, M 15%, Q 25%, H 30%) trade data capacity for resilience. A code at level H survives losing up to 30% of its dots; useful for printing on labels that might get scuffed or covering part of the code with a logo overlay.

Example: encoding a URL

Type https://toolsnug.com into the input. The QR code appears below — a small, dense pattern at the default settings. Scan it with any phone camera and the URL appears as a tap-to-open prompt. Download as PNG for digital use or SVG for print.

Example: encoding wifi credentials

QR codes have a standard format for wifi credentials: WIFI:T:WPA;S:NetworkName;P:Password;;. Pasting this into the QR generator produces a code that, when scanned by a modern phone, prompts the user to join the network — no manual SSID/password typing required. Useful for guest wifi at events, offices, and shared spaces.

Example: contact card (vCard)

A vCard string like BEGIN:VCARD\nVERSION:3.0\nFN:Jane Doe\nTEL:+15555550100\nEMAIL:jane@example.com\nEND:VCARD produces a QR code that, when scanned, prompts the user to save the contact. Useful for business cards.

Common mistakes

Encoding a very long URL directly. QR codes have data limits — long URLs with tracking parameters can exceed them, especially at high error-correction levels. Shorten the URL first or use a redirect.

Picking colors with low contrast. QR scanners need clear contrast between the dark modules and the background. Black-on-white is the safe default; dark-color-on-white works (dark blue, dark green, dark red); pastel-on-pastel does not. The tool will let you pick anything, but unscannable codes are silent failures — check by scanning before printing.

Removing the margin. The white border around the QR code is part of the spec — scanners look for the contrast boundary to find the code’s edges. The QR standard recommends at least 4 modules of margin. Going below 2 makes some scanners fail to detect the code.

Printing too small. A QR code at 1 cm × 1 cm scans reliably from about 30 cm with a phone camera. Smaller print needs higher print resolution (at least 300 DPI) and a scanner closer to the code. The rule of thumb: print width should be at least 10× the expected scanning distance ÷ 30.

What this tool does not do

It doesn’t render a logo overlay automatically. Composite the logo over the high-EC PNG in an image editor.

It doesn’t validate that the encoded data is meaningful (URLs, vCards, wifi strings) — it encodes whatever you type. If your QR code “doesn’t work”, check that the source string is well-formed for the destination format.

It doesn’t decode QR codes. For decoding, use any phone camera or a dedicated QR reader.

If the payload is a URL with special characters, percent-escape it first with the URL encoder / decoder so scanners resolve it cleanly.

Frequently asked questions

Which error-correction level should I pick?

L (7% recovery) for clean print on a flat surface where the code won't be damaged. M (15%, default) for screens and most printed contexts. Q (25%) for QR codes on packaging or labels that might get scuffed. H (30%) for codes that might be partially obscured by a logo overlay or printed on a curved surface. Higher levels make the code denser (more dots) for the same data, so a high-EC code at the same scale is physically larger.

What's the maximum amount of data I can encode?

QR version 40 (the largest standard size) holds about 2,953 alphanumeric characters at error-correction level L, dropping to about 1,273 at level H. Numeric-only data fits more (up to 7,089 digits at L). Long URLs or paragraphs of text exceed these limits and the generator returns an error. For long URLs, use a URL shortener first; for long text, link to a hosted version instead of embedding it.

Should I use PNG or SVG output?

SVG is better for print: vector scales to any size without pixelation. PNG is better for screen use and for systems that don't accept SVG (some social media uploads, email signatures in older clients). Both files contain the same QR code; pick by destination.

Why is the code denser when I add more text?

QR codes have 40 standardised sizes (versions 1-40), each holding more data than the last. The generator picks the smallest version that fits your data plus the chosen error-correction overhead. Adding more text crosses a version boundary and the code jumps to a denser pattern. The 'Version N' label below the preview shows which version was chosen.

Can I add a logo to the center of the code?

Not directly with this tool — but if you use error correction H (30%), you can overlay a logo on the printed code (covering up to ~25% of the surface area) and the code will still scan. The remaining error-correction overhead handles the missing data. Composite the logo over the PNG in any image editor.