Stax
Tools
toolsdeveloperproductivity

How to Create a QR Code for Any URL, WiFi, Contact, or WhatsApp Number — Entirely in Your Browser

Step-by-step guide to generating QR codes for URLs, WiFi networks, contacts, WhatsApp links, and plain text — no signup, no upload, no server. Everything encodes locally in your browser.

Harshil
Harshil
··12 min read
🌐

This article is currently only available in English. A 日本語 translation is coming soon.

How to Create a QR Code for Any URL, WiFi, Contact, or WhatsApp Number — Entirely in Your Browser

By the end of this guide you'll know how to generate the right kind of QR code for any use case — a product page URL, a WiFi network, a WhatsApp link, a business contact, or plain text — download it in the format your situation needs, and avoid the two mistakes that cause QR codes to stop working after printing. All of it runs in your browser at Stax QR Code Generator. Nothing leaves your device.


What a QR code actually encodes

Before touching the tool, one minute of context: a QR code is not a picture of a URL. It is a machine-readable encoding of a text string. What goes inside that string determines what happens when someone scans it.

  • For a website: the string is the URL (https://example.com)
  • For WiFi: it's a structured config string (WIFI:S:NetworkName;T:WPA;P:password;;)
  • For a contact: it's a vCard format text block
  • For WhatsApp: it's a WhatsApp deep link (https://wa.me/919876543210)
  • For email: it's a mailto: URI
  • For plain text: it's just the text itself

The QR code generator doesn't know the difference between a WiFi password and a web URL at a structural level — it encodes whatever string you give it. What matters is giving it the right format of string for the scanner app to understand. Most QR code generators handle this formatting for you when you select the input type.

How Any Input Becomes a QR Code Your Input https://stax.tools URL · WiFi · vCard WhatsApp · Email Plain text No upload · Browser only Encode QR Code Output Scannable by any phone camera
Each QR module is encoded from your input locally — no data travels to a server.

Step 1: Choose the right QR code type for your use case

The Stax QR Code Generator supports six input types. Picking the wrong one is the most common source of "the QR code links nowhere" errors.

TypeWhat it encodesBest forWatch out for
URL A full web address Product pages, menus, social profiles, landing pages Use HTTPS; long URLs produce denser (harder to scan) codes→ use a short URL if over 100 characters
WiFi SSID + password + encryption type Guest WiFi at offices, cafés, events, hotel rooms Passwords are stored in the QR image — don't print with WPA2 password exposed without considering access→ use a guest network with a short password
WhatsApp wa.me deep link to a phone number Customer support, business contacts, product stickers Number must include country code (91 for India); no + prefix→ also try /whatsapp-qr-code for a dedicated tool
vCard / Contact Name, phone, email, company in vCard format Business cards, conference badges, email signatures Some older Android scanners import vCard 2.1 only — test on the target device first
Email mailto: URI with pre-filled address and subject Feedback forms, contact-us QR on printed materials Opens the device's default mail app — won't work if the user has no email client configured
Plain text Raw text string Coupons, promo codes, reference numbers, short notes No hyperlink behaviour — the scanner will display the text, not navigate anywhere

Rule of thumb: If you want the user to visit a website, always use URL type — even if the destination is a WhatsApp number. A WhatsApp QR should use the WhatsApp type so it deep-links directly into the chat.


Step 2: Enter your data in the generator

Open Stax QR Code Generator. The interface shows a type selector and an input field.

For URL: Paste the full address including https://. The generator validates the format before encoding. If your URL contains special characters (like campaign UTM parameters with & symbols), they are automatically percent-encoded in the QR string — you don't need to sanitise it manually.

For WiFi: Enter the network name (SSID) exactly as it appears — case-sensitive, including any spaces. Select the security type (WPA/WPA2, WEP, or Open/None). Enter the password. The generator builds the WIFI:S:...;T:...;P:...;; string for you.

For WhatsApp: Enter the 10-digit Indian mobile number without any prefix, or include the country code (e.g., 919876543210 for an Indian number with country code). The generator builds the https://wa.me/ link. You can optionally pre-fill a message — useful for support bots where you want the user to start with a specific phrase.

For vCard: Fill in the fields — name, mobile, email, company, URL. The generator produces a vCard 3.0 string with all populated fields. Leave unused fields blank.

The preview QR code updates live as you type. At this point it's just a preview — the downloadable file is generated in the next step.


Step 3: Set the right size and output format

This is where most people make the mistake that causes the QR code to fail after printing.

Size matters for print distance. The minimum scannable size of a QR code depends on how far away the scanner will be:

  • Business card or sticker (scanned within 30 cm): minimum 2 cm × 2 cm → download at 300px or higher
  • A4 poster or flyer (scanned within 1 m): minimum 5 cm × 5 cm → download at 600–800px
  • Banner or signage (scanned from 2+ metres): minimum 15 cm × 15 cm → use SVG or 1200px PNG

PNG vs SVG:

  • PNG is appropriate for digital use (emails, websites, presentations) where the pixel size is fixed. Download at the resolution you'll display it.
  • SVG is better for print because it scales to any size without pixelation. If you're sending to a printer, download SVG.

The Stax generator outputs PNG at the resolution you select. For print-intended QR codes, always test the downloaded file by scanning it before finalising.

Quiet zone: The white border around a QR code is not decoration — it is required for scanners to detect the code boundary. Do not crop it. The generator includes the correct 4-module quiet zone by default.


Step 4: Test before printing

This step is skipped by almost everyone and causes the most visible QR failures. Before any print run or mass distribution:

  1. Scan with at least two devices — iOS native camera app and an Android device running a dedicated QR scanner (like Google Lens). Different apps handle some edge cases differently, especially for WiFi and vCard formats.

  2. Check the destination loads — for URLs, verify the page actually loads, not just that the link is correct. A 404 or redirect loop is just as bad as a broken QR.

  3. Test at the actual scan distance — if the QR will be on a shop sign 2 metres away, test scanning it from 2 metres, not 30 cm.

  4. Test on a printed sample first — laser vs inkjet printing, coloured backgrounds, and lamination all affect scan reliability. A matte laminate over a small QR code is a known failure mode.

  5. For WiFi QR codes — test on a device that has never connected to the network before (or forget the network first). Some devices auto-connect via stored credentials and you won't notice the QR is broken until a new user fails.


Step 5: Embed or share the QR code in the right context

A QR code without context converts poorly. The location and framing affect scan rates significantly:

On printed materials:
Add a short call-to-action above the QR code. "Scan for menu" or "Scan to WhatsApp us" tells the user what to expect. Without it, scan rates drop by 30–50% in practice.

On digital surfaces (emails, PDFs, presentations):
QR codes on digital screens are counterproductive for URLs — the user already has a clickable link available. Digital QR makes sense only for scenarios where the user is switching devices: scan a QR in an email on a laptop to open something on their phone.

On websites:
Embedding a QR code on a webpage for a phone number (so users can scan it with a second device to save the contact) is a legitimate use case. Embedding a QR code for a URL the user is already on is not.

File formats by destination:

  • Email or Google Slides: PNG
  • Business card PDF: SVG → embed in Illustrator/Canva → export PDF
  • Social media post: PNG at 1080×1080 (place the QR in one quadrant, add branded context in the rest)

When a QR code stops working

The most common failure modes and their causes:

The URL moved. Static QR codes encode the URL at generation time. If you update the page slug, move the domain, or redirect the path, the old QR code breaks. This is why high-print-volume uses (product packaging, signage) sometimes use a redirect service in the middle — the QR links to a short URL that you can update without reprinting.

The WiFi password changed. A WiFi QR code is static. If you change the network password, the old QR stops working. Regenerate and reprint.

The QR was damaged or printed at too low a resolution. QR codes have error correction built in (levels L, M, Q, H — with H being the most damage-tolerant at the cost of density). For outdoor or physically handled materials, use error correction level H.

The background contrast is too low. QR codes require high contrast between the dark modules and the background. Black on white is optimal. Avoid printing dark QR codes on dark backgrounds, or applying the QR over a busy image.

The quiet zone was removed. This happens when designers crop the image tightly to remove "padding." The white border is structural — remove it and the scanner cannot locate the code boundary.


Calculate scanning distance for your use case

Use the QR Code Generator to regenerate if your current QR is failing any of the test cases above. The generator lets you choose the error correction level alongside the output size — for outdoor prints, select level H (High) for maximum damage tolerance.

If you're generating WhatsApp-specific QR codes, the dedicated WhatsApp QR Code tool pre-formats the wa.me link correctly and adds a pre-filled message option — useful for support teams who want the first message standardised.


My Take

QR codes are one of those tools that look trivially simple until you have a failed print run. The failure modes are all predictable — wrong type for the use case, too small for the scan distance, no quiet zone, no pre-print test. Spending two minutes on Steps 3 and 4 of this guide before sending anything to print will save you from reprinting 500 flyers. The browser-based generator at Stax handles the encoding correctly; the part that requires judgment is choosing the right format, size, and error correction level for your physical context.


Sources & methodology

QR code standards: ISO/IEC 18004:2015 — the international standard for QR Code symbology. Error correction levels (L/M/Q/H), quiet zone requirements (4 modules minimum), and module density specifications.

WiFi QR format: ZXing (Zebra Crossing) WiFi encoding specification, the de-facto standard supported by iOS Camera app (iOS 11+) and Android native scanner.

WhatsApp deep link format: WhatsApp FAQ — click to chat, confirming wa.me/{number} format and optional pre-filled message via ?text= parameter.

Scan distance rule of thumb: Based on QR code minimum size recommendations from QR Code Alliance guidelines, cross-referenced with smartphone camera resolution data for scanning distance estimation.

Error correction levels: ISO/IEC 18004:2015 Section 7.4 — Level L recovers 7% of data, M 15%, Q 25%, H 30%.


The bottom line

For any QR code: pick the correct input type, enter the data exactly (case-sensitive for WiFi, country code for WhatsApp), download in the right format and size for your print distance, test on two devices before committing to print, and include context text so the user knows what to expect when they scan. The whole process takes under three minutes in the generator — the ten minutes you spend testing is the part that actually prevents a failed deployment.

Generate your QR code now — runs entirely in your browser, nothing stored.

Harshil

Harshil

Developer & Founder, stax.tools

Harshil is the developer behind stax.tools, building privacy-first tools that run entirely in your browser.

More by Harshil →

🛠️

Found this useful?

Browse 235+ free privacy-first tools — no login, no uploads, instant results.

Browse tools →
← Back to all posts