QR Code Generator

Create QR codes for text, URLs, and more.

Enter any text, URL, email, phone number, or Wi-Fi credentials.

What Is a QR Code Generator?

A QR code generator converts text, URLs, or other data into a scannable two-dimensional barcode image. You enter the content you want to encode, and the tool produces a square image of black and white modules that any smartphone camera can read instantly. This tool uses the Google Charts API to create QR codes directly in your browser.

QR codes have become ubiquitous in daily life. Restaurants use them for digital menus, businesses print them on marketing materials, events use them for ticketing, and individuals put them on business cards. Their ability to bridge the physical and digital worlds -- scanning a printed code to instantly open a website -- makes them one of the most practical technologies of the mobile era.

How QR Codes Work

A QR code encodes data as a matrix of dark and light modules (squares) arranged in a square grid. The encoding process involves several steps:

Data analysis: The encoder examines the input to determine the most efficient encoding mode. Numeric data uses the most compact encoding, alphanumeric is slightly less compact, and byte mode handles arbitrary characters.

Error correction: QR codes include Reed-Solomon error correction data that allows them to be read even if partially damaged. There are four error correction levels: L (7% recovery), M (15%), Q (25%), and H (30%). Higher correction levels make the code more resilient but require more space.

Module placement: The data and error correction codes are arranged in the matrix according to strict placement rules. Three large finder patterns (the distinctive squares in three corners) allow scanners to detect and orient the code. Timing patterns and alignment patterns provide positional reference points.

Masking: A mask pattern is applied to optimize the distribution of dark and light modules for reliable scanning. The encoder tests eight different masks and selects the one that produces the most balanced pattern.

The quiet zone, a white border at least four modules wide surrounding the code, is essential for scanners to distinguish the QR code from its background.

How to Use This Tool

  1. Enter your content. Type or paste any text, URL, or formatted data into the input field. For URLs, include the full address starting with http:// or https://. The tool automatically detects the content type (URL, email, phone, etc.).

  2. Select a size. Choose from Small (200x200), Medium (300x300), Large (400x400), or Extra Large (500x500) pixels. Medium works well for on-screen display. For printing, choose Large or Extra Large to maintain clarity when printed.

  3. Click Generate QR Code. The QR code appears immediately above the results. The code also generates automatically as you type with a brief delay.

  4. Save the QR code. Right-click the image and select "Save Image As" to download it as a PNG file. You can then insert it into documents, presentations, print materials, or websites.

Worked Examples

Example 1: Website URL

Enter "https://example.com" to generate a QR code that opens the website when scanned. The content type is detected as "URL" and most phone cameras will display a prompt to open the link in a browser.

Example 2: Wi-Fi Credentials

Enter the string in the format "WIFI:T:WPA;S:NetworkName;P:Password;;" to create a QR code that automatically connects a phone to your Wi-Fi network when scanned. Replace NetworkName with your SSID and Password with your Wi-Fi password. Use T:WEP for WEP networks or T:nopass for open networks.

Example 3: Contact Information

Enter a vCard formatted string starting with "BEGIN:VCARD" to encode contact details that add a new contact when scanned. Include name, phone, email, and address fields. This is commonly used on business cards to let recipients save your contact information instantly.

Example 4: Plain Text Message

Enter any plain text message. When scanned, the text is simply displayed on the screen. This can be used for scavenger hunts, product information, short instructions, or any context where you want to deliver text content through a scannable code.

Tips and Best Practices

Keep content short. Shorter content produces simpler QR codes with larger modules that are easier to scan, especially at small print sizes or from a distance. For long URLs, consider using a URL shortener.

Always test before printing. Generate the QR code, then scan it with at least two different phones to confirm it works correctly. Test at the actual size it will be printed and at the expected scanning distance.

Maintain high contrast. The most reliable QR codes use black modules on a white background. While colored QR codes are possible, reduced contrast can cause scanning failures, especially in low light or on glossy surfaces.

Include a quiet zone. The white border around the QR code is not decorative; it is required for scanners to detect the code boundaries. Never crop or reduce this border. Allow at least 4 module widths of white space on all sides.

Add a call to action. A QR code by itself does not tell people what to do. Include a short instruction next to the code such as "Scan to visit our website" or "Scan for menu" to encourage engagement.

Consider the scanning environment. A QR code on a billboard needs to be much larger than one on a business card. As a rough guide, the code should be at least 1/10th of the distance from which it will be scanned. A code scanned from 3 feet away should be at least 3.6 inches across.

Frequently Asked Questions

What is a QR code?

A QR (Quick Response) code is a two-dimensional barcode that stores data in a pattern of black and white squares. Invented by Denso Wave in 1994 for tracking automotive parts, QR codes can encode text, URLs, contact information, Wi-Fi credentials, and more. They are designed to be read quickly by cameras and can store significantly more data than traditional one-dimensional barcodes.

How much data can a QR code hold?

A QR code can store up to 7,089 numeric characters, 4,296 alphanumeric characters, or 2,953 bytes of binary data. However, larger amounts of data make the code more complex and harder to scan, especially at small sizes. For best results, keep the encoded content under 300 characters. URLs should be as short as possible, and you can use URL shorteners for long web addresses.

Can I use the generated QR code for commercial purposes?

Yes, QR codes themselves are an open standard and are free to use commercially. The encoding algorithm is patented by Denso Wave but they have chosen not to enforce the patent. This tool generates QR codes using a free API, and the resulting images can be used in marketing materials, business cards, product packaging, menus, and any other commercial application.

How do I scan a QR code?

Most modern smartphones (iPhone with iOS 11+ and Android 8+) can scan QR codes directly through the built-in camera app without installing additional software. Simply open your camera and point it at the QR code. A notification or link will appear on screen. Alternatively, Google Lens and dedicated QR scanner apps provide scanning functionality with additional features.

What types of content can I encode in a QR code?

You can encode plain text, website URLs, email addresses (using mailto: prefix), phone numbers (using tel: prefix), SMS messages (using sms: prefix), Wi-Fi network credentials (using the WIFI: format), calendar events (using vCal format), geographic coordinates, and vCard contact information. The scanner app determines how to handle each content type, typically opening the appropriate app automatically.

Do QR codes expire?

Static QR codes like those generated by this tool do not expire. The data is encoded directly in the pattern and remains readable as long as the image exists. However, if the QR code points to a URL, the destination website could go offline or the URL could change. Dynamic QR codes offered by paid services allow you to change the destination URL after creation, but those depend on the service remaining operational.

What size should my QR code be for printing?

The minimum recommended print size is about 2 x 2 cm (0.8 x 0.8 inches) for scanning at close range. For scanning at arm's length (like a poster), use at least 3 x 3 cm. For billboards or signage scanned from a distance, the code should be about 1/10th of the scanning distance in size. Always test your printed QR code with multiple devices before mass production.

Why is my QR code not scanning properly?

Common scanning issues include insufficient contrast between dark and light modules (use black on white for best results), the code being too small for the scanning distance, damage or distortion to the image, insufficient quiet zone (white border around the code), and glare from glossy surfaces. Ensure adequate lighting and hold the camera steady. If the code contains a very long URL, the density of modules may make it difficult to scan at small sizes.