QR with Icon
One command turns any text into a branded, scannable QR code.
A Python command-line tool that generates branded QR codes with custom icons, dot styles, and a built-in scannability check.
One command turns any text into a branded, scannable QR code.
A Python command-line tool that generates branded QR codes with custom icons, dot styles, and a built-in scannability check.
I needed a WiFi QR code for my home and did not want to paste my network password into an online QR generator. So I wrote a small Python script that runs entirely on my machine. After I shared the result, a few friends asked for the script, so I cleaned it up and made it usable by anyone.
The tool is a single command-line script. You pass the data to encode and an output file name, and it writes a QR code as PNG, SVG, or PDF based on the extension. Flags let you overlay a custom icon (with an optional white or black background plate so the icon stays readable), switch between square and circle dot styles, and tune the QR version (1 to 40) and box size.
Embedding an icon eats into a QR code’s error correction budget, so the script includes a robustness check that is enabled by default. It verifies that the generated code still decodes after the icon is composited on top, which catches cases where the branding would have broken the scan.
pip install -r requirements.txt
python qr_with_icon.py -d "Hello World" -o hello_qr.png python qr_with_icon.py -d "WIFI:S:MySSID;T:WPA;P:mypassword;;" -o wifi_qr.png -i wifi_icons/wifi-signal.png -ib white → Full setup guide configuration, deployment, troubleshooting