iPhone Shortcuts NFC Automation: Tap a Tag to Show a Wi-Fi QR Code
A Shortcuts NFC automation can't read Wi-Fi details from the tag, so the login lives in the shortcut. Here is how to build one that shows a Wi-Fi QR code.
Tap a tag, show a QR code
You can stick an NFC tag by the front door so that one tap on your iPhone opens a Wi-Fi QR code, which a guest scans with their camera. The tag only starts a shortcut. The shortcut holds the network name and password and turns them into the code.
Why the tag can't hold the Wi-Fi login
The Shortcuts NFC Tag trigger runs an automation when you scan a tag. Apple says that other than the unique identifier, the contents of the NFC tag are ignored. So a Wi-Fi record written to the tag is never read by this trigger. Think of it as a labelled button.
That decides the design: the credentials go inside the shortcut, and the tag just says "run it". If you would rather have a tag that carries the login itself, see a Wi-Fi tag with a URL fallback.
Build the shortcut that shows the QR code
Open Shortcuts and create a new shortcut with two actions.
- Text. Type the Wi-Fi details in the standard payload format:
WIFI:T:WPA;S:GuestNetwork;P:your-password;;
- Generate QR Code. Pass the text in. The action generates a QR code from the input text and shows a preview you can share, save or print.
The fields come from the ZXing barcode contents page:
| Field | Meaning |
|---|---|
T | Security type: WEP, WPA, WPA2-EAP or nopass |
S | Network name (required) |
P | Password (ignored for nopass) |
H | true if the network is hidden |
The order of the fields doesn't matter, and the string ends with ;;. If the name or password contains \, ;, ,, " or :, put a backslash in front of that character. A password like a;b becomes a\;b.
Before you involve a tag, run the shortcut by hand and scan the result with a second phone.
Create the NFC tag automation
- In Shortcuts, open the Automation tab and start a new personal automation.
- Choose the NFC trigger, tap to scan, and hold the tag against the top of the iPhone. Give the tag a name.
- Choose your Wi-Fi QR shortcut as the action and finish.
Blank NTAG stickers cost under a dollar each, and you don't have to write anything to them for this trigger, since only the identifier counts. Put the tag where guests and you both pass, and keep it out of children's reach. If you reuse a tag later, remember that an erased tag can still trigger its old shortcut, because the automation is tied to the tag's identifier.
Make the tap run without a prompt
By default iOS asks before it runs an automation. Apple lists NFC among the personal automations that can run without asking for confirmation, so you can turn the prompt off and the code appears on the tap. Apple adds that an automation set this way will not notify you when it runs. To use the tag while the phone is locked, open the shortcut's info settings, tap Privacy and enable Allow Running When Locked. More on this in NFC automations that run without asking.
Keep guests on a guest network
Anyone who can see the code can join the network it describes. Put the guest network's login in the shortcut, not your main one, and change that password now and then. Then update the Text action, or guests will scan a code that no longer works.
iOS 18 has a built-in version
If you only need the code now and then, iOS 18 can show it without a shortcut. Open the Passwords app, tap the Wi-Fi card, pick the network and tap Show Network QR code. That takes several taps and a sign-in, while the tag takes one.
What to remember
The tag triggers, the shortcut stores the login, and Generate QR Code draws it. Use a guest network password, and test the code before you stick the tag down. To check what is on a tag before you rely on it, NFCore for iPhone reads and writes NDEF records on your own tags, and there is also a Google Play version.
Frequently Asked Questions
Can an NFC tag store my Wi-Fi password for a Shortcuts automation?
Not for this trigger. Shortcuts uses only the tag's unique identifier and ignores the rest of its contents, so the login lives inside the shortcut.
What does the Wi-Fi QR code text look like?
It is plain text such as WIFI:T:WPA;S:NetworkName;P:Password;;. Put a backslash before \, ;, ,, " and : when they appear in the name or password.
Should I use my main network?
Use a guest network. Anyone who can see the code can join, so change the password now and then and update the shortcut when you do.
Is there a built-in way on iOS 18?
Yes. The Passwords app can show a network QR code, but it takes several taps and a sign-in, while the tag version takes one tap.