QR code generator: what it is, how it works and best practices
The QR code (Quick Response) is one of the most widely used visual encoding standards in the world. From restaurant menus to business cards, mobile payments, and two-factor authentication, QR codes have become a universal bridge between the physical and digital worlds.
What is a QR code and how does it work?
A QR code is a two-dimensional matrix of black and white dots that encodes information according to the ISO/IEC 18004 standard. Unlike traditional barcodes (1D), QR codes store data in two dimensions, allowing them to contain much more information in a smaller space. Smartphone scanners decode the dot patterns to extract the encoded text, URL, or data.
The information is encoded with multiple layers of redundancy (levels L, M, Q, and H), meaning the QR can still be read even if up to 30% of its surface is damaged or obscured. That is why it is possible to place a logo in the center of a QR code without it stopping to work.
Types of content a QR can store
- URLs — the most common use. Opens a web page directly.
- Plain text — any message up to several kilobytes.
- vCard contact — name, phone, email and address in standard format.
- WiFi — network and password to connect automatically without typing.
- WhatsApp — opens a direct chat with a specific number.
- Email — creates a draft with pre-filled recipient, subject, and body.
- SMS, geolocation, calendar events.
Static vs. dynamic QR codes
A static QR encodes the information directly in the image and cannot be changed after generation. A dynamic QR points to an intermediate URL that redirects to the final destination; this allows changing the destination without reprinting the physical code (useful for printed posters) and provides scan statistics. For personal or business use without tracking, a static QR is sufficient and completely free.
Minimum size and reading distance
The minimum recommended size for printing is 2 × 2 cm for reading at a distance of 20–30 cm. The farther the reading distance, the larger the QR must be. As a general rule, the QR should be at least 1/10 of the expected scanning distance. A 10 × 10 cm QR can be comfortably scanned from 1 meter.
Best practices for creating quality QR codes
- Use error correction level H if you plan to add a logo in the center.
- Always download as SVG for print; PNG for digital use.
- Maintain good contrast: black on white or very dark on very light colors.
- Always include a quiet zone (white margin) around the code.
- Test the QR on multiple devices before printing or publishing.
- Shorten long URLs before encoding them to reduce the QR size and density.