A lightweight, fast, and reliable QR Code Generator built with Python. This tool allows you to generate high‑quality QR codes from any text or URL using a simple command‑line interface. The project is minimal, production‑ready, and suitable for direct use or integration into larger systems.
- Generate QR codes from text or URLs
- High error‑correction level for better scanning reliability
- Customizable output file name
- Adjustable QR size and border
- Works on Windows, macOS, and Linux
- Clean and simple command‑line interface
qr_code_generator.py
requirements.txt
README.md
- Clone the repository:
git clone https://github.com/your-username/python-qr-code-generator.git
cd python-qr-code-generator
- Install dependencies:
pip install -r requirements.txt
Basic example:
python qr_code_generator.py -d "https://www.google.com"
This will generate a file named qrcode.png in the current directory.
python qr_code_generator.py -d "Hello World" -o output/myqr.png
python qr_code_generator.py -d "Sample Text" -s 12 -b 2
| Option | Description |
|---|---|
-d, --data |
Text or URL to encode (required) |
-o, --output |
Output image file name (default: qrcode.png) |
-s, --size |
Box size of the QR code (default: 10) |
-b, --border |
Border size around QR (default: 4) |
The program generates a high‑resolution PNG image containing the QR code. The file can be used directly for printing, sharing, or embedding into documents and websites.
- Python 3.7 or higher
- qrcode
- pillow
- Sharing URLs quickly
- Generating QR codes for events or posters
- Creating QR labels for products
- Learning basic Python CLI development
This project is open‑source and free to use for personal and commercial purposes.