Go to content
cutty.dev
All posts

QR code for WiFi — guests connect without entering a password

Create a QR code for WiFi so guests can connect with a single scan, without having to dictate the password. Format, guest network, and a replaceable link for when the password changes.

There is such a moment during every visit. Someone takes off their shoes, is still standing in the hallway, and before "how have you been?" happens, the question arises: "what's your WiFi password?". And the ritual begins. You get up, go to the router, turn it upside down, squinting your eyes at the microscopic sticker. You dictate. "T as in Tomek, zero, u, b, four... no, four, not fourteen, just four". On the other side, someone types, deletes, types again. Was that a capital B or lowercase? After the fifth attempt, the phone finally catches the network and a silence of relief falls.

I've done this hundreds of times. And every time I thought the same thing: there must be a simpler way. There is. One small square stuck by the door or on the side of the fridge. Phone nearby, one second, connected. No spelling out, no gymnastics with the router.

What is actually inside this square

Modern phones (iPhone since iOS 11, Android since roughly the tenth version) can connect to the web simply by scanning a code. It sounds like sorcery, but it is no magic. Underneath, there is plain text, graphically encoded according to an established scheme:

WIFI:T:WPA;S:NazwaSieci;P:TwojeHaslo;;

Let's break this down into parts:

  • T is the security type. WPA includes WPA2 and WPA3, there is also WEP, and for an open network, you leave it empty.
  • S is the SSID, which is simply the name of your network.
  • P is the password.
  • H:true is added only when the network is hidden and does not broadcast its name.

The device reads this string of characters, the system sees the WIFI: prefix, recognizes the pattern, and automatically suggests a connection. One tap. The guest will never see the password, doesn't have to type it, has no way to memorize or carry it away. The same trick works on a piece of paper in a rental guest room, on a coaster in a cafe, on an office door. Anywhere people arrive and simply want to have internet.

However, there is one catch that most people stumble upon the first time.

The semicolon that ruins everything

If in the network name or password you have the character ;, ,, :, \ or a quotation mark ", you must precede it with a backslash. Otherwise, the phone will cut off the password exactly at that point, because it will treat the semicolon as the end of the field. Let's say your password is pa;ss"word. You save it like this:

WIFI:T:WPA;S:Dom_Salon;P:pa\;ss\"word;;

And that's it. This is absolutely the most common cause of "I scanned it and it doesn't work" complaints. A person generated a code, the password had a semicolon in the middle, and they didn't escape it. The phone received half the password and politely refused. Check this before you print fifty copies.

Who are you actually opening the door to

Here I would like to pause for a moment, because this is the part that people most often skip, yet it is the most important. A QR code is a physical object. It hangs on a wall, lies on a table, someone can snap a photo of it with a phone from the other side of the room without even connecting. And since that is the case, the question is not "how to make a code", but "where does it lead".

Imagine that this code points to your main home network. The same one where your NAS with twenty years of photos, printer, cameras, and maybe a file server are sitting. You stick it in the Airbnb apartment you are renting. Or in a business premises. And suddenly, everyone who has slept at your place for a week has access to your LAN, plus anyone to whom you send a photo of the sticker.

Therefore: almost every router today has a guest network, in English Guest Network. It is a separate SSID, isolated from the rest of your LAN, usually with the possibility of limiting bandwidth. You generate the code specifically for it. That way, even if a photo of the code ends up on someone's Instagram or in a Facebook group, a stranger will gain access to the internet at most. Not to your devices. It is one of those decisions that costs two minutes in the router panel but saves you sleepless nights.

Static code has one ugly flaw

Hardcoding WiFi data looks elegant until you change the password. Because then the code is useless. Entirely. Let's say you run a small cafe and printed fifty coasters with a nice QR code. After some time, the password leaks, you change it for the guest networks and... fifty coasters are fit for the bin. Plus the cost of a new print. Plus time.

There is another way. Instead of hardcoding the WiFi data forever, you code a link. The link leads to a very simple page with connection instructions or with the current password. The QR code itself remains the same forever, and what it leads to can be changed at any time.

In cutty.dev it looks like this:

  1. You create a short link, for example cutty.dev/wifi-cafe, which leads to a page with the password or instructions.
  2. You generate a QR code for this link. You print it on coasters, on doors, on flyers.
  3. Changing the password? You edit the destination of the same link. All printed codes continue to work, and you don't have to print a single new one.

There is still one small detail that raw WIFI:... code will never give you. You see how many times someone actually scanned the code. In a cafe or at an event, this isn't just statistics for the sake of statistics, but concrete information about traffic. Moreover, this is done without tracking people's every move; the IP goes into a hash, and no one builds a guest profile. An increasingly rare thing, so it's worth appreciating.

Humanly speaking, what to choose

  • Home, friends, a password you set once and never change? A simple static code WIFI:.... Easiest way, works even without internet on the scanning phone.
  • Premises, rental, event, a password that rotates every month? A code pointing to a changeable link. So you don't have to reprint materials every single time.

A few things that are easy to overlook

Print the code in a size of at least 2 by 2 centimeters. Smaller sizes can be finicky with weaker cameras. And do not laminate it with a high gloss, because light reflections can ruin the scan (tested on my own skin by a window at noon).

Add the network name and password as plain text below the code. This is a fallback for older phones and for your aunt, who prefers to type it in manually. It costs you one line, but saves the day.

And the most important thing at the end of this list: do not post code leading to the main network with a real password on your public social media profile. It is literally publishing the key to your LAN. People do this without thinking, because "it's just a pretty picture".

Please provide the Polish Markdown you would like me to translate. You have only provided the template instructions without the source text.

I have a sticker like this at home, stuck on the inside of the cupboard in the hallway. Guests know it's there, scan it as they pass, and that whole ritual of spelling out the password has simply disappeared. A small detail, yet it changed the way people enter my apartment. Sometimes the best improvements aren't the big ones, but those that cut out one small, repetitive moment of frustration. If your password likes to change, base the code on a replaceable link and be done with it once and for all. And if it doesn't, even a piece of paper with a handwritten code will do the job. The only question is, where will you stick it.