Developer ToolsΒ·4 min

How to Generate a QR Code (Free, Customizable)

Create QR codes for URLs, WiFi, contacts, and more. Customize colors and size, download as PNG or SVG.

What is a QR code and why generate one?

A QR code (Quick Response code) is a two-dimensional barcode that can store up to 4,296 alphanumeric characters or 7,089 numeric characters. Invented in 1994 by Denso Wave, a Japanese subsidiary of Toyota, QR codes were originally designed to track vehicles during manufacturing. They have since become a universal tool for bridging physical and digital: scanning a printed QR code with a phone camera opens a URL, shows contact details, connects to WiFi, or executes payment flows β€” no typing required.

You will want to generate QR codes when:

  • Sharing a URL: Print it on a flyer, business card, or product label. People scan and visit.
  • WiFi access: A QR code containing your network SSID and password lets guests join without typing.
  • Contact cards (vCard): Encode your name, phone, email, and address so people can save it directly to their phone contacts.
  • Email and SMS: Pre-fill the subject and body of a message, or the destination phone number.
  • Crypto payments: Bitcoin, Ethereum, and most wallets use QR codes to encode a payment address and amount.
  • Two-factor authentication (TOTP): Authenticator apps like Google Authenticator display QR codes to set up 2FA on a new device.
  • App deep links: Link directly to a screen in your app (e.g., `myapp://product/123`).
  • Inventory and ticketing: A QR code on each item encodes an ID for tracking.

The good news: generating QR codes is free, fast, and private if you use the right tool.

QR code types and capacity

There are several standards for QR code content:

  • URL: A simple web address. `https://example.com`
  • Text: Arbitrary text up to ~4,000 characters
  • vCard: A contact card with name, phone, email, address
  • WiFi: `WIFI:T:WPA;S:mynetwork;P:mypassword;;`
  • Email: `mailto:[email protected]?subject=Hello&body=Hi`
  • SMS: `sms:+15551234567?body=Hello`
  • Phone: `tel:+15551234567`
  • Geo: `geo:37.7749,-122.4194` (latitude, longitude)
  • Crypto: `bitcoin:1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?amount=0.5`

QR codes also have error correction levels that control how much of the code can be damaged before it becomes unreadable:

  • L (Low): ~7 % of code can be lost
  • M (Medium): ~15 % can be lost
  • Q (Quartile): ~25 % can be lost
  • H (High): ~30 % can be lost

Higher error correction makes the QR code denser (more squares), but is more resilient. For printing on curved surfaces, outdoor signs, or anything that may get scratched, use Q or H.

Method 1: Use UtilBoxx's QR Code Generator (Recommended)

The fastest, most private, and most customizable way to generate QR codes in your browser is the UtilBoxx QR Code Generator. It supports URLs, text, WiFi, vCard, email, phone, SMS, geo, and crypto, with full color and size customization, and downloads as PNG or SVG. Everything runs in your browser β€” no upload, no signup, no log of what you generate.

How to use it:

  1. Go to utilboxx.com/en/tools/dev/qrcode
  2. Choose your content type: URL, WiFi, vCard, email, etc.
  3. Fill in the fields (URL, SSID/password, contact details, etc.)
  4. Customize the color, background, size, and error correction
  5. Click Generate
  6. Download as PNG (for screen) or SVG (for print)

Why we recommend this method:

  • 100% free, no signup, no email, no watermarks
  • Privacy-first: the QR code is generated in your browser. The content never leaves your device. Critical for sensitive QR codes (WiFi passwords, 2FA secrets, crypto addresses).
  • All major types: URL, WiFi, vCard, email, phone, SMS, geo, crypto
  • Full customization: foreground color, background color, size, error correction, margin
  • PNG and SVG export: PNG for screen and web, SVG for print (SVG scales infinitely without quality loss)
  • Works on any device with a browser

If you generate QR codes even once a month, this tool will pay for itself in saved time and privacy.

Method 2: python-qrcode library (Python)

Python's `qrcode` library (along with `Pillow` for image rendering) is the canonical tool for programmatic QR code generation. Install with `pip install qrcode[pil]`.

```python import qrcode from qrcode.constants import ERROR_CORRECT_H

# Simple URL qr = qrcode.QRCode( version=None, # auto-detect size error_correction=ERROR_CORRECT_H, box_size=10, # pixel size of each square border=4, # quiet zone in squares ) qr.add_data("https://example.com") qr.make(fit=True)

img = qr.make_image(fill_color="black", back_color="white") img.save("url_qr.png")

# WiFi QR code wifi_qr = qrcode.QRCode(box_size=10, border=4) wifi_qr.add_data("WIFI:T:WPA;S:MyNetwork;P:MyPassword;;") wifi = wifi_qr.make_image() wifi.save("wifi_qr.png")

# vCard vcard = """BEGIN:VCARD VERSION:3.0 FN:Ada Lovelace ORG:UtilBoxx TEL:+15551234567 EMAIL:[email protected] URL:https://example.com END:VCARD""" vcard_qr = qrcode.QRCode(box_size=8, border=2) vcard_qr.add_data(vcard) vcard_img = vcard_qr.make_image() vcard_img.save("vcard_qr.png")

# SVG output (for print) from qrcode.image.svg import SvgPathImage svg_qr = qrcode.QRCode(box_size=10, border=4) svg_qr.add_data("https://example.com") svg_img = svg_qr.make_image(image_factory=SvgPathImage) with open("url_qr.svg", "wb") as f: svg_img.save(f) ```

For batch generation (say, 1,000 inventory tags), a small script with `qrcode` and a CSV of IDs produces all the files in seconds.

Method 3: CLI with qrencode (Linux/macOS)

The `qrencode` command-line tool is a fast, scriptable way to generate QR codes. Install with Homebrew on macOS (`brew install qrencode`) or apt on Linux (`sudo apt install qrencode`).

```bash # Generate a QR code for a URL qrencode -o url.png "https://example.com"

# Generate with higher error correction qrencode -o url.png -l H "https://example.com"

# Generate as SVG (for print, scales infinitely) qrencode -o url.svg -t SVG "https://example.com"

# Generate as ANSI text (for terminal display!) qrencode -t ANSI "https://example.com"

# Generate as UTF-8 text (for nicer terminal output) qrencode -t UTF8 "https://example.com"

# WiFi QR qrencode -o wifi.png "WIFI:T:WPA;S:MyNetwork;P:MyPassword;;"

# vCard qrencode -o vcard.png "BEGIN:VCARD VERSION:3.0 FN:Ada Lovelace TEL:+15551234567 END:VCARD" ```

`qrencode` is the fastest path for one-off QR generation in a shell session, and ideal for scripts that need to embed QR codes in pipelines. The `-t ANSI` mode lets you print QR codes directly in the terminal, which is a fun trick for sharing without a GUI.

Method 4: Online tools (other than UtilBoxx)

There are many other online QR code generators β€” most of them work, but with caveats:

  • Some upload your data: If you scan a WiFi QR, the SSID and password are sensitive. Make sure the tool processes locally (UtilBoxx does) or has a clear privacy policy.
  • Some add watermarks: Free tiers often add a small logo or branded border. Read the fine print.
  • Some limit features: Customization, types, and error correction may be behind a paywall.
  • Some have ads: Popup ads, redirect ads, and tracking pixels are common.

When in doubt, prefer a privacy-respecting tool that processes in the browser. UtilBoxx's QR generator is built on `qrcode` and runs the entire pipeline client-side.

Common questions

How much data can a QR code hold?

The maximum is 4,296 alphanumeric characters or 7,089 numeric characters or 2,953 binary bytes at the lowest error correction level. In practice, QR codes work best with short data β€” long URLs become dense and harder to scan. For content over ~300 characters, consider a shortened URL (via a service like bit.ly) or a different code type (Data Matrix, PDF417, Aztec).

What is the difference between a static and dynamic QR code?

A static QR code encodes a fixed URL or content. It cannot be changed after generation. A dynamic QR code points to a redirect service that you control: scan it once and the URL never changes, but you can update where it redirects. Dynamic codes require a paid service and have a privacy cost (the redirect service logs every scan). For privacy, prefer static codes.

Are QR codes a security risk?

Yes, in a few specific ways:

  • Quishing (QR phishing): A malicious QR code can lead to a phishing site. Always preview the URL before opening it.
  • Drive-by malware: A QR code can link to a malicious APK or .exe download. Don't scan codes from untrusted sources.
  • WiFi sharing: If you generate a QR code for your home WiFi and post it publicly, anyone can join your network. Use guest networks with limited access for shared QR codes.
  • Payment redirection: Crypto address substitution attacks generate QR codes for the attacker's wallet. Always verify the address character by character before sending.

The QR code itself is just a square. The risk is the URL or action it triggers.

What is the best size for a printed QR code?

A common rule of thumb: the QR code should be at least 1 cm (0.4 in) wide per 10 characters of data, with a minimum of 2 cm Γ— 2 cm (0.8 in Γ— 0.8 in). For most QR codes (~50 characters), 2 cm is enough. For dense codes (~500 characters), aim for 4-5 cm. Always include a "quiet zone" of at least 4 empty squares around the code β€” most tools add this by default.

For distance scanning, multiply by the expected distance: a code meant to be scanned from 1 meter should be at least 2.5 cm wide.

Can QR codes be styled or branded?

Yes, but with care. The three finder patterns (the large squares in three corners) must remain perfectly intact and high-contrast against the background. You can:

  • Change the color of the data modules (foreground) and background
  • Add a logo in the center (use higher error correction Q or H to compensate for the obscured data)
  • Round the module corners for a modern look
  • Add a frame with text below the code

Do not:

  • Invert colors (light on dark is hard for some scanners)
  • Add gradients (most scanners can read them, but some cannot)
  • Place text or graphics over the data modules
  • Distort the square aspect ratio

What is the smallest scannable QR code?

The minimum practical size is about 1 cm Γ— 1 cm for short data and good lighting. Smaller codes (down to a few millimeters) are possible with high-resolution printing and high-contrast ink, but most phone cameras struggle. For most uses, 2-3 cm is the practical floor.

Conclusion

QR codes are the universal bridge between physical and digital. They are free to generate, free to scan (every phone has a built-in scanner), and support dozens of content types from URLs to WiFi credentials to crypto payments. The right tool matters: privacy-respecting tools run entirely in your browser, while others upload your data to remote servers.

For occasional generation, the UtilBoxx QR Code Generator is private, free, and produces high-quality PNG and SVG output with full customization. For batch work, Python's `qrcode` library or the `qrencode` CLI handle thousands of codes without leaving your terminal. And for one-offs, an online tool works as long as you trust it with your data.

A quick design tip: keep the contrast high (black on white is the gold standard), add a quiet zone, and use error correction H if you plan to overlay a logo. Your QR code will scan reliably on the first try.