2D QR Matrices, EAN-13 / Code 128 Barcodes & vCard / Wi-Fi Payload Encoding Runbook
Engineer reliable physical-to-digital scanning workflows: understand ISO/IEC 18004 QR error correction and quiet zones, EAN-13 modulo-10 check digits, Code 128B SKU encoding, and Wi-Fi / vCard 3.0 payload escaping rules.
1. QR Code Error Correction (Reed-Solomon) & The 4-Module Quiet Zone
| ECC Level | Recovery Capacity | Best Practice Workload | Density Overhead | Copy |
|---|---|---|---|---|
| L (Low) | Restores up to 7% damaged codewords | Dense vCards on crisp OLED screens | Minimal | |
| M (Medium) | Restores up to 15% damaged codewords | Default URLs, tickets, and print receipts | Balanced | |
| Q (Quartile) | Restores up to 25% damaged codewords | Shipping boxes and industrial asset tags | Moderate | |
| H (High) | Restores up to 30% damaged codewords | Outdoor stickers or posters with center badges | Maximum |
2. 1D Retail Barcodes: EAN-13 Checksum Math vs Code 128B SKUs
export function ean13CheckDigit(first12: string): number {
const sum = [...first12].reduce((acc, ch, i) => acc + Number(ch) * (i % 2 === 0 ? 1 : 3), 0);
return (10 - (sum % 10)) % 10;
}Alternates weights of 1 (even index) and 3 (odd index) before taking the complement modulo 10.
| Symbology | Character Set | Checksum Standard | Primary Industry Role | Copy |
|---|---|---|---|---|
| EAN-13 | 12 numeric digits + 1 computed check | Modulo 10 (1/3 weights) | Global POS retail GTIN | |
| UPC-A | 11 numeric digits + 1 computed check | EAN-13 leading 0 subset | North American retail | |
| Code 128B | Full ASCII 32-127 alphanumeric | Modulo 103 weighted sum | Logistics, warehouse SKUs, healthcare |
3. Wi-Fi URI Syntax & vCard 3.0 Delimiter Escaping
WIFI:T:WPA;S:NetworkName;P:SecretPass;H:false;;. Always backslash-escape literal semicolons (\;), colons (\:), commas (\,), and backslashes inside SSIDs or passwords; an unescaped semicolon truncates the passphrase silently during Android Wi-Fi Provisioner parsing.WIFI:T:WPA;S:Office\;Guest;P:Correct\:Horse123;;
BEGIN:VCARD
VERSION:3.0
N:Doe;Jane;;;
FN:Jane Doe
TEL;TYPE=CELL:+31612345678
EMAIL:jane@example.com
END:VCARDUse CRLF line endings for vCard 3.0 imports across macOS Contacts, iOS, and Outlook.
| URI / Record Prefix | OS Handler Action | Critical Validation Pitfall | Copy |
|---|---|---|---|
| WIFI:T:WPA;S:...; | Prompts instant Join Wi-Fi Network dialog | Unescaped ; : , or \ in SSID/PSK | |
| BEGIN:VCARD / 3.0 | Opens Add Contact sheet offline | Missing N: property or non-CRLF newlines | |
| https://... | Displays verified domain preview banner | Low contrast inverted foreground colors |
4. Vector SVG vs PNG Rasterization for Label Printers
Related Free Online Tools
Put these techniques into practice immediately with our privacy-first browser utilities:
Generate crisp high-contrast PNG and SVG QR codes offline with custom size and error correction.
Decode QR payloads locally from screenshots, clipboard images, or uploads via jsQR.
Render precision vector SVG retail EAN-13 and ASCII Code 128B barcodes with auto check digits.
Independent software developer focused on client-side architectures, local-first computing, WebAssembly, and privacy-first web systems.