Generate QR Codes for Offline Marketing
Bridge the gap between physical and digital marketing by generating custom-branded QR codes for print materials, product packaging, and in-store displays.
What You'll Learn
- Generate custom QR codes - Create branded QR codes with your colors and logo
- Batch generate QR codes - Create hundreds of QR codes for product lines or events
- Optimize for print - Export high-resolution files for professional printing
- Track offline performance - Measure QR code scans and conversions
- Best practices - Placement, sizing, and testing for maximum scans
Prerequisites
- A SnipLink account (sign up here)
- A short link you want to create a QR code for
- Optional: Your brand logo in PNG format (transparent background recommended)
Quick Start: Generate Your First QR Code
Using the Dashboard (No Code)
The fastest way to create a QR code:
- Go to Dashboard and select a link
- Click the "QR Code" tab
- Customize colors, size, and error correction level
- Click "Generate QR Code"
- Download as PNG, SVG, or PDF
Using the API
For programmatic generation or bulk operations:
curl -X POST https://api.sniplink.co/v1/links/{linkId}/qr \
-H "X-API-Key: snip_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"linkId": "lnk_abc123",
"format": "png",
"size": 1024,
"errorCorrection": "H",
"foregroundColor": "#10b981",
"backgroundColor": "#ffffff"
}'Customization Options
1. Format Selection
| Format | Best For | File Size |
|---|---|---|
| PNG | Digital displays, websites, social media | Small |
| SVG | Print materials, scaling to any size | Smallest |
| Professional printing, high-quality output | Medium |
2. Size Selection
Choose the right size based on your use case:
- 256px: Email signatures, digital ads
- 512px: Social media, presentations
- 1024px: Posters, flyers, product packaging
- 2048px: Billboards, large banners, trade show displays
3. Error Correction Levels
Higher levels allow scanning even if the QR code is partially damaged:
- L (Low): 7% recovery - Clean environments, digital only
- M (Medium): 15% recovery - Standard printing, indoor use
- Q (Quartile): 25% recovery - Outdoor use, rough handling
- H (High): 30% recovery - Harsh conditions, logo embedding
Advanced: Add Your Brand Logo
Embed your company logo in the center of the QR code:
const response = await fetch(
`https://api.sniplink.co/v1/links/${linkId}/qr`,
{
method: 039;POST039;,
headers: {
039;X-API-Key039;: process.env.SNIPLINK_API_KEY!,
039;Content-Type039;: 039;application/json039;,
},
body: JSON.stringify({
linkId,
format: 039;png039;,
size: 1024,
errorCorrection: 039;H039;, // High error correction for logo
foregroundColor: 039;#10b981039;, // Brand green
backgroundColor: 039;#ffffff039;,
logoUrl: 039;https://yourbrand.com/logo.png',
logoSize: 20, // 20% of QR code size
}),
}
);
const { data } = await response.json();
console.log(039;QR Code URL:039;, data.publicUrl);- ⢠PNG format with transparent background
- ⢠Square aspect ratio (1:1)
- ⢠Maximum 30% of QR code size
- ⢠High contrast with QR code colors
Batch Generation for Print Campaigns
Generate QR codes for multiple products or locations:
// batch-generate-qr-codes.ts
import fs from 039;fs039;;
import { parse } from 039;csv-parse/sync039;;
const API_BASE = 039;https://api.sniplink.co/v1';
const API_KEY = process.env.SNIPLINK_API_KEY!;
interface Product {
linkId: string;
productName: string;
productSKU: string;
}
async function generateQRCode(linkId: string) {
const response = await fetch(`${API_BASE}/links/${linkId}/qr`, {
method: 039;POST039;,
headers: {
039;X-API-Key039;: API_KEY,
039;Content-Type039;: 039;application/json039;,
},
body: JSON.stringify({
linkId,
format: 039;pdf039;, // PDF for professional printing
size: 2048, // High resolution
errorCorrection: 039;H039;,
foregroundColor: 039;#000000039;,
backgroundColor: 039;#ffffff039;,
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(error.error?.message || 039;Failed to generate QR code039;);
}
return response.json();
}
async function downloadQRCode(qrCodeId: string, filename: string) {
const response = await fetch(`${API_BASE}/qr/${qrCodeId}/download`, {
headers: { 039;X-API-Key039;: API_KEY },
});
const buffer = await response.arrayBuffer();
fs.writeFileSync(`output/${filename}.pdf`, Buffer.from(buffer));
}
async function main() {
// Read products from CSV
const csvContent = fs.readFileSync(039;products.csv039;, 039;utf-8039;);
const products: Product[] = parse(csvContent, {
columns: true,
skip_empty_lines: true,
});
console.log(`š Generating ${products.length} QR codes...\n`);
// Create output directory
if (!fs.existsSync(039;output039;)) {
fs.mkdirSync(039;output039;);
}
for (const product of products) {
try {
// Generate QR code
const { data } = await generateQRCode(product.linkId);
// Download PDF
await downloadQRCode(data.id, `${product.productSKU}-qr-code`);
console.log(`ā
${product.productName} (${product.productSKU})`);
// Rate limiting: wait 1 second (Free tier: 10/hour, Pro: unlimited)
await new Promise((resolve) => setTimeout(resolve, 1000));
} catch (error) {
console.error(`ā ${product.productName}: ${error.message}`);
}
}
console.log(`\n⨠Done! QR codes saved to output/ directory`);
}
main();Example products.csv:
linkId,productName,productSKU
lnk_abc123,Outdoor Tent Pro,TENT-001
lnk_def456,Camping Backpack,PACK-002
lnk_ghi789,Portable Stove,STOVE-003Track QR Code Performance
Monitor how your offline campaigns perform:
// Get QR code analytics
const response = await fetch(
`https://api.sniplink.co/v1/qr/${qrCodeId}/analytics?days=30`,
{
headers: { 039;X-API-Key039;: API_KEY },
}
);
const { data } = await response.json();
console.log(039;QR Code Performance:039;);
console.log(` Total Scans: ${data.totalScans}`);
console.log(` Unique Scans: ${data.uniqueScans}`);
console.log(` Scan Rate: ${((data.uniqueScans / data.totalScans) * 100).toFixed(1)}%`);
console.log(`\nTop Locations:`);
data.scansByCountry.slice(0, 5).forEach((country: any) => {
console.log(` ${country.country}: ${country.scans} scans`);
});Best Practices for Print Materials
1. Size and Placement
- Minimum size: 2cm Ć 2cm (0.8" Ć 0.8") for reliable scanning
- Optimal size: 3-4cm Ć 3-4cm (1.2"-1.6" Ć 1.2"-1.6")
- Placement: Eye level, easy to reach, good lighting
- Quiet zone: Leave 4 modules of white space around the QR code
2. Color Contrast
- High contrast required: Dark foreground on light background
- Avoid: Light colors, gradients, patterns
- Test before printing: Always test with multiple phone cameras
3. Call-to-Action Text
Always include instructions with your QR code:
- "Scan to learn more"
- "Scan for exclusive discount"
- "Scan to download app"
- "Scan to view menu"
4. Testing Checklist
Real-World Use Cases
Restaurant Menus
Replace physical menus with QR codes:
- Generate one QR code per table
- Track which tables get the most scans (seating popularity)
- Update menu without reprinting
- Add UTM parameters to track online orders from in-store scans
Product Packaging
Bridge product and digital experience:
- Link to user manuals, assembly videos, or support
- Track which products generate the most engagement
- Collect product reviews via QR code scan
- Offer warranty registration
Event Materials
Conference badges, posters, and handouts:
- Speaker slides and resources
- Session feedback forms
- Networking/contact exchange
- Track attendance and engagement
Real Estate Signage
Property "For Sale" signs and brochures:
- Virtual tours and photo galleries
- Schedule showing appointments
- Track which properties get the most interest
- Geographic analytics (where scans happen)
Advanced: Dynamic QR Codes
All SnipLink QR codes are dynamic - you can update the destination URL without regenerating the QR code:
// Update link destination after printing QR codes
await fetch(`https://api.sniplink.co/v1/links/${linkId}`, {
method: 039;PATCH039;,
headers: {
039;X-API-Key039;: API_KEY,
039;Content-Type039;: 039;application/json039;,
},
body: JSON.stringify({
url: 039;https://new-destination.com',
}),
});
// QR codes already printed will now direct to new destination!Troubleshooting Common Issues
QR Code Won't Scan
- Too small: Increase size to at least 2cm Ć 2cm
- Low contrast: Use black on white for best results
- Damaged: Use higher error correction level (Q or H)
- Glossy surface: Avoid reflective materials, use matte finish
Logo Blocks Scanning
- Reduce logo size (stay under 25%)
- Use H error correction level
- Ensure logo is centered
- Test before printing
Next Steps
- Track campaigns: Use Campaign Tracking tutorial to measure ROI
- Bulk operations: Use Bulk Link Generator to create links first
- Analytics: Build Analytics Dashboard to visualize performance
Need Print-Ready QR Codes?
We can help you create professional, print-ready QR codes for your campaign.