Batch Generate QR Codes
Generate hundreds of QR codes from a list of URLs, contacts, or inventory items using Python, Node.js, and CLI tools. Perfect for events, marketing, and asset tracking.
The Problem
You need QR codes for 200 event badges, 500 product labels, or a marketing campaign with unique tracking URLs. Generating them one at a time in a web tool would take hours.
Why Batch Processing Matters
Bulk QR code generation is essential for event management (attendee badges with unique check-in URLs), product packaging (serial numbers, warranty links), marketing campaigns (personalized landing pages), and inventory management (asset tracking labels).
Common Use Cases
- Generate unique QR codes for 500 event attendee badges
- Create product labels with QR codes linking to warranty registration
- Build a marketing campaign with personalized tracking URLs
- Label office equipment with asset management QR codes
Step-by-Step Instructions
Prepare your data source
Create a CSV or text file with one entry per line: URL, email address, phone number, or any text you want encoded in a QR code.
Install a QR code library
For Python: pip install qrcode[pil]. For Node.js: npm install qrcode. For CLI: brew install qrencode or apt install qrencode.
Run the batch generation script
Use the scripts below to read your data and generate QR code images. Each QR code is saved as a PNG file with the item identifier as the filename.
Review and export
Spot-check a few QR codes with your phone camera. For printing, ensure images are at least 300 DPI. For web use, SVG format scales better.
Code Examples
# Install qrencode
# macOS: brew install qrencode
# Ubuntu: sudo apt install qrencode
# Generate QR codes from a list of URLs
mkdir -p qr_codes
i=1
while IFS= read -r url; do
qrencode -o "qr_codes/qr_$(printf '%03d' $i).png" -s 10 "$url"
echo "Generated: qr_$i.png for $url"
i=$((i + 1))
done < urls.txt
# Generate SVG format (scalable)
while IFS= read -r url; do
slug=$(echo "$url" | sed 's|https://||;s|/|_|g')
qrencode -t SVG -o "qr_codes/${slug}.svg" "$url"
done < urls.txt
# Generate with custom size and error correction
qrencode -o output.png -s 20 -l H "https://example.com"
# -s 20 = module size (pixels), -l H = high error correction
Single vs Batch Comparison
Type URL → generate QR code → download PNG
$ cat urls.txt | wc -l 200 $ python batch_qr.py Generated 200 QR codes in qr_codes/ $ ls qr_codes/ | head -5 001_Alice_Smith.png 002_Bob_Jones.png 003_Carol_Williams.png 004_Dave_Brown.png 005_Eve_Davis.png
Frequently Asked Questions
What's the maximum data a QR code can hold?
A QR code can hold up to 4,296 alphanumeric characters or 2,953 bytes of binary data (at the lowest error correction level). For URLs, keep them under 500 characters. Use URL shorteners for longer links.
What error correction level should I use?
Use H (High, 30%) for printed materials that might get damaged. Use L (Low, 7%) for digital-only use to keep QR codes smaller. Medium (M, 15%) is a good default for most applications.
What size should QR codes be for printing?
Minimum 2cm x 2cm (0.8" x 0.8") for close-range scanning. For posters or signs scanned from a distance, use at least 10cm x 10cm. The rule of thumb: QR code width should be 1/10th of the expected scanning distance.
Related Batch Guides
Try these tools interactively
Each tool runs in your browser with no signup required. Process single items instantly.