How does a WiFi QR code actually work?
It encodes the network name, password and security type in a format phone cameras recognise automatically. When a phone scans it, the camera app offers to join the network directly instead of opening a link. No separate app is required on modern iOS or Android.
Is the password safe to put in a QR code?
It’s exactly as safe as the network itself. The QR code is generated entirely in your browser and nothing is uploaded anywhere, but anyone who scans the printed code can join the network. Treat it the same way you’d treat handing someone the password on paper.