Skip to content

How to Generate a QR Code

Create a QR code from any text or URL. Set the error correction, size and colors, then download it as a PNG or copy it as a data URI.

Updated 4 steps
  1. 1

    Enter your content

    Type or paste the text, URL, email address, or other data you want to encode. The input is a single line, so line breaks aren't kept.

  2. 2

    Customize the QR code

    Choose an error correction level (L, M, Q or H), a size (128, 256, 512 or 1024 px), and the dark and light colors. Every module is drawn the same whole number of pixels, so the image can come out a few pixels off the size you picked; the actual size is shown under the preview.

  3. 3

    Preview the QR code

    The preview redraws as you type. Scan it with a phone camera to check that it reads correctly before you download it.

  4. 4

    Download or copy

    Click Download PNG to save the image as qrcode.png, or Copy Data URI to copy it as a data:image/png;base64 string you can paste into an HTML img src or a CSS url(). The tool makes PNGs only.

QR codes bridge the gap between physical and digital. A single scan takes someone from a printed poster, product label, or business card straight to a URL, contact card, or Wi-Fi network. The QR Code Generator lets you create codes for any content in seconds, with full control over size and error correction.

Understanding QR codes

A QR (Quick Response) code is a two-dimensional barcode that encodes data in a grid of black and white squares. Unlike traditional barcodes, QR codes can store thousands of characters and can be scanned from any angle. They support several data types natively: URLs, plain text, email addresses, phone numbers, Wi-Fi credentials, and vCard contact information.

The amount of data you can encode depends on the content type and error correction level. A URL like https://example.com produces a small, simple code. A paragraph of text or a full vCard produces a denser one. As a general rule, keep your encoded content as short as possible — shorter data means a simpler code that scans more reliably from a distance.

Why error correction matters

QR codes include redundant data so they can still be scanned even when partially damaged or obscured. There are four error correction levels:

  • L (Low): Recovers up to 7% of data. Produces the smallest code. Best for digital-only use where the image will not be damaged.
  • M (Medium): Recovers up to 15%. A good default for most use cases.
  • Q (Quartile): Recovers up to 25%. Use this for printed materials that may get worn.
  • H (High): Recovers up to 30%. Required if you plan to overlay a logo on the center of the QR code, since the logo obscures part of the data.

Higher error correction means more data modules in the code, making it denser. Choose the lowest level that meets your reliability needs.

Tips and best practices

  • Use short URLs. If you are encoding a long URL, consider using a URL shortener or redirect. A shorter URL produces a less dense QR code that scans faster and from farther away.
  • Download the 1024 px PNG for print. At 300 dpi it prints about 8.7 cm (3.4 in) wide. For a larger print, scale it up by a whole factor (2×, 3×) with nearest-neighbor resampling so the modules stay equal and the edges stay sharp. Smooth resampling blurs the edges between modules.
  • Keep the quiet zone. QR codes need blank space around them (the “quiet zone”) to scan reliably. The generator adds the standard 4 modules of light space on each side, so do not crop the image to the edge of the pattern.
  • Test before printing. Always scan your generated QR code with at least two different phone cameras before sending anything to print. What looks correct on screen may not scan if the contrast is too low or the code is too small.

Common issues

  • QR code does not scan: The most common cause is insufficient size or contrast. QR codes should be at least 2 cm (0.8 inches) per side for close-range scanning and significantly larger for posters or signage. Ensure strong contrast between the code and background — dark code on a light background works best.
  • Code works on some phones but not others: Older camera apps struggle with very dense QR codes. Reduce the data length or lower the error correction level to simplify the code. Also avoid inverting colors (light code on dark background), as some readers do not handle this well.
  • Encoded URL is wrong after printing: QR codes cannot be edited once generated. If you need to change the destination URL after printing, encode a redirect URL that you control (like a short link) so you can update the destination without reprinting the code.

Open QR Code Generator

Use the QR Code Generator tool directly — no sign-up needed. Runs entirely in your browser.

Open QR Code Generator