Small CLI to generate QR codes from text or URLs, with an optional centered logo. Supports PNG, JPG, and SVG logos. SVG files are rasterized with transparency before placement. An example is placed on the right.
- Python 3.10+
# Text
python qr_creator.py --text "Hello, world!" -o qr.png
# URL
python qr_creator.py --url "https://example.com" -o qr.png
# With centered logo (PNG, JPG, or SVG)
python qr_creator.py --url "https://example.com" --logo logo.svg -o qr.pngor simply:
./qr_creator.py --text "Hello, world!" -o qr.png| Flag | Description |
|---|---|
--text, -t |
Plain text to encode |
--url, -u |
URL to encode |
--output, -o |
Output path (default: qr_code.png) |
--logo, -l |
Logo image path |
--logo-ratio |
Logo size as fraction of QR width (default: 0.22) |
--no-trim-logo |
Keep transparent padding around the logo |
--box-size |
Pixels per QR module (default: 10) |
--border |
Quiet zone in modules (default: 4) |
--fill-color |
QR foreground color (default: black) |
--back-color |
QR background color (default: white) |
- Uses high error correction so the QR code still scans with a center logo.
- Logo trim only removes transparent padding; it does not crop into the logo artwork itself.
- JPEG output drops transparency; use PNG for logos with alpha.
