Note: All data is processed locally in your browser and will not be uploaded to any server.

Basic Configuration

Higher error correction level allows the QR code to withstand more damage, but makes it more complex

Width of the generated QR code (pixels)

White space around the QR code, in module units

Tool is loading, please wait a moment...

Tool Introduction

QR Code Generator is a powerful online tool that helps you quickly generate high-quality QR codes. It supports customizing colors, sizes, error correction levels and other parameters. You can also add logos to make QR codes more personalized. Generated QR codes can be exported in PNG, JPEG, WebP or SVG formats, suitable for various use cases.

How to Use

  1. Enter the content to encode in the left input box (text, URL, contact information, etc.)
  2. Adjust basic configuration as needed (error correction level, output type, size, etc.)
  3. For personalization, customize colors and upload logos in advanced configuration
  4. Click the 'Generate QR Code' button to view the generated QR code on the right
  5. Use the 'Download' button to save the QR code image, or copy the Data URL and SVG code

Features

  • Supports multiple output formats: PNG, JPEG, WebP, SVG
  • Customizable error correction level for different environments
  • Supports custom QR code colors (foreground and background)
  • Can add logo images to create personalized QR codes
  • Flexibly adjust size and margin
  • Real-time preview of generated results
  • Provides Data URL and SVG code output
  • Completely processed locally in browser, protecting data privacy
  • Supports dark mode

FAQ

Q: What is error correction level? Which one should I choose?

A: Error correction level determines how much damage a QR code can withstand while still being correctly recognized. Level L can recover about 7% of data, M 15%, Q 25%, H 30%. If you want to add a logo or worry about the QR code being obscured, it's recommended to choose Q or H level. For daily use, M level is usually sufficient.

Q: Will my data be uploaded to the server?

A: No. All QR code generation processing is done locally in your browser and will not be uploaded to any server, fully protecting your data privacy.

Q: Why can't the QR code be scanned after adding a logo?

A: The logo should not be too large, it's recommended not to exceed 20% of the QR code size. Also, choosing a higher error correction level (Q or H) can improve recognition success rate after adding a logo.

Q: What's the difference between PNG and SVG formats?

A: PNG is a bitmap format, suitable for direct use on web pages and applications; SVG is a vector format that can be infinitely scaled without losing quality, suitable for printing or scenarios requiring high-quality output.

Q: How much information can a QR code contain?

A: This depends on the error correction level and data type. Generally, pure numbers can contain thousands of characters, alphanumeric can contain hundreds to over a thousand characters, and Chinese or Unicode characters will be less. The more content, the more complex and dense the QR code will be.

Technical Challenges

Error Correction Encoding Algorithm

QR codes use Reed-Solomon error correction codes to implement error correction functionality. This algorithm can recover original data through redundant information when some data is lost or damaged. The higher the error correction level, the more redundant information is needed, and the more complex the QR code will be.

Logo Embedding Technology

Embedding a logo in the center of a QR code requires precise calculation of the logo's size and position, while ensuring that it doesn't cover critical positioning points and data areas. Usually, the logo should be placed in the center of the QR code, and the size should not exceed 20-30% of the QR code area (depending on the error correction level).

Color Contrast Requirements

QR code scanning relies on the contrast between dark and light areas. To ensure recognizability, the contrast between foreground and background colors should be sufficiently large. Dark colors should be used for data modules, and light colors for the background. Inappropriate color choices may cause the QR code to be unrecognizable by scanners.

Vector to Bitmap Conversion

SVG format provides vector output that can be scaled losslessly. While bitmap formats like PNG need to determine resolution at generation time. The tool supports rendering QR codes to bitmaps using Canvas API and exporting via Data URL or Blob methods.

Related Concepts

QR Code

QR Code (Quick Response Code) is a type of 2D barcode invented by Denso Wave, Japan in 1994. Compared to traditional 1D barcodes, QR codes can store more information, including various data types such as text, URLs, and contact information.

Error Correction Level

The error correction capability level of QR codes, divided into four levels: L, M, Q, H, which can recover approximately 7%, 15%, 25%, 30% of data respectively. The higher the error correction level, the more redundant data in the QR code, and the greater the degree of damage it can withstand.

Position Detection Patterns

Square markers at the corners of QR codes (usually three), used to help scanners determine the position, size and rotation angle of the QR code. These markers are crucial for QR code recognition and cannot be obscured.

Data URL

A method of directly embedding image data into HTML or CSS, formatted as data:[<mediatype>][;base64],<data>. Using Data URLs can reduce HTTP requests but increases the size of HTML documents.

SVG (Scalable Vector Graphics)

An XML-based vector image format. SVG images can be infinitely scaled without losing quality, suitable for scenarios requiring high-quality output or printing.

Terminology

Module
The smallest unit in a QR code, usually displayed as a black or white square. QR codes are composed of these modules arranged according to specific rules.
Version
The size specification of QR codes, from Version 1 (21×21 modules) to Version 40 (177×177 modules). The higher the version, the more data can be stored, and the more complex the QR code.
Encoding Mode
QR codes support multiple encoding modes: numeric mode, alphanumeric mode, byte mode, kanji mode, etc. Different modes have different storage efficiency, and the tool will automatically select the optimal encoding mode.