All projects
Utilities / ● Maintained

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.

3
Output formats
PNG, SVG, PDF
40
QR versions supported
Version 1 (smallest) to 40 (largest)
2
Dot styles
Square or circle
Synced 0m ago

The problem

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.

How I built it

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.

01 / Quick start

Run it in under a minute

pip install -r requirements.txt
python qr_with_icon.py -d "Hello World" -o hello_qr.png