QR code reader (compatible with both image files and web cameras) | ZeroTools

Read and analyze QR codes at high speed by loading image files or real-time scanning with a PC or smartphone camera. It is a convenient web tool that operates completely locally and safely without sending data to an external server.

Loading tool interface...

Client-Side Secure Execution

This tool executes entirely in your browser sandbox. None of your input strings, files, or configurations are uploaded to any external server.

ZeroTools: Browser Processing & Privacy

ZeroTools focuses on tools that process input on your device. Check each tool’s scope and limitations before use.

Processing and privacy policy
Chapter 1

Video stream analysis mechanism using WebRTC and jsQR library

This function is the core system responsible for acquiring and analyzing camera video streams running on a web browser. Access to the camera device installed on the user's device is achieved through the navigator.mediaDevices.getUserMedia method of the Media Capture and Streams API, a web standard technology.

By calling this method, we obtain the video input stream in real time, bind directly to the HTML video element, and draw a preview on the screen.

Frames of the video stream are periodically transferred to the canvas element and extracted as a two-dimensional array of pixel data.

The extracted RGBA image data is passed to the jsQR library for high-frequency, low-latency processing. jsQR is a pure JavaScript-implemented two-dimensional code decoder that supports both still images and videos, runs on the browser's main thread or web worker, and executes high-speed analysis processing at tens of frames per second without delay.

This makes it possible to provide an extremely smooth real-time decoding experience using a single web browser without using a dedicated native application.

Chapter 2

Finder pattern detection and symbol position correction in accordance with **JIS X 0510** standard

When the image data is passed to the decoder, the first step is a spatial search for the two-dimensional code based on the JIS X 0510 standard.

The focus of this process is to identify the finder pattern, also known as the position detection pattern, located at three of the four corners of the two-dimensional code.

The finder pattern has a geometric feature in which the ratio of the dark/bright/dark/bright/dark module widths is 1:1:3:1:1, and the system scans the entire image from each direction horizontally, vertically, and diagonally to extract areas that match this unique contrast ratio.

Once the three finder patterns are accurately detected, the rotation angle, tilt, and module size of the entire symbol are calculated based on their centroid positions.

Furthermore, by using alignment pattern detection, perspective distortion caused by the camera's shooting angle and nonlinear distortion of the lens are corrected using a mathematical projective transformation matrix.

This advanced symbol position correction processing makes it possible to construct an accurate sampling grid for each module and safely carry it over to the subsequent data extraction process, even when the image is taken from an oblique direction or a two-dimensional code printed on a curved surface.

Chapter 3

Reed-Solomon error correction decoding model and data restoration processing

After the light and dark states of the module are extracted as binary data, the system reads the format information and model number information to determine the error correction level and mask pattern.

The identified mask pattern is used to unmask the data area by exclusive OR operation, and the original arrangement of data codewords and error correction codewords is restored.

The core of this is the Reed-Solomon error correction deciphering model that applies algebraic geometry over finite fields. In addition to the data itself, a redundant error correction code is added to the two-dimensional code to prevent reading errors due to dirt, defects, or reflection of light.

Perform syndrome calculations on the restored codeword array to determine whether errors exist.

If an error is detected, the system applies the Berlekamp-Massey algorithm to derive the error location polynomial and uses Chen's search method to identify the specific error location.

It then uses Forney's algorithm to calculate the magnitude of the error and mathematically repairs missing or inverted bits.

The application of this rigorous Reed-Solomon error correction algorithm guarantees a complete recovery of the original encoded data, even if a certain percentage of the symbol area is physically corrupted.

Chapter 4

Automatic classification and safety confirmation of decrypted data and local parsing processing

The raw byte string recovered through Reed-Solomon error correction is converted to text data according to the rules of the character encoding.

The resulting text data is immediately sent to an automatic classification engine that uses regular expressions and string analysis.

This classification engine instantly determines whether the data is a URL to a website, Wi-Fi connection information for connecting to a specific network, or plain text data.

In the case of Wi-Fi connection information, elements such as SSID, encryption method, and password are accurately parsed according to the specified format.

An extremely important architectural constraint here is that all captured camera footage, image data, and decoded text data are processed only in the user's device's internal memory and are never sent to an external server.

This complete local parsing completely eliminates user privacy and the risk of leaking confidential information. All safety confirmation processes are completed on the client side, achieving robust and secure information handling that is independent of the communication environment.

Chapter 5

Implementation of URL expansion safety check and clipboard one-click copy

If the classification engine determines that the data is a URL, a URL expansion safety check is performed as a step before opening it directly in the browser.

Obfuscated links that use many shortened URLs or redirects are statically filtered within the client to determine whether they are safe domains.

To prevent phishing scams and inadvertent transitions to malicious sites, the complete decoded URL string and domain affiliation information are clearly displayed on the screen to encourage users to visually confirm the URL.

Once safety has been confirmed, a one-click copy function to the clipboard has been implemented so that users can use the information in other applications.

This feature works by calling the navigator.clipboard.writeText method, an asynchronous clipboard API, and eliminates the complexity of traditional selection and copy operations.

A temporary toast notification is displayed on the screen as soon as the copy operation is completed, providing reliable interaction between the system and the user.

Chapter 6

Practical application of store coupons, Wi-Fi automatic connection, and paper URL transition

The practical application range of this system is wide-ranging and covers all contactless data exchange scenarios in daily life. When reading store coupons, the system extracts a special coupon identification code by reading the promotional two-dimensional code posted at the store register or on printed matter, and skips the process of inputting it into the purchasing system or point application.

In the Wi-Fi automatic connection scenario, in public spaces such as cafes and accommodations, it completely eliminates the need to manually enter the network name and password, and provides the ability to seamlessly navigate to the OS network settings screen based on the decrypted authentication information, or use it as a profile.

In addition, when transitioning paper media URLs, we act as a bridge from physical print media such as magazines, posters, and business cards to digital space.

The advanced correction processing and error correction described above function even under adverse conditions such as ink smearing and paper sagging that are typical of printing, allowing users to instantly access target web content and contact information simply by holding up the camera.

These practical applications provide the foundation for seamlessly bridging the boundaries between the physical and digital worlds and significantly streamlining users' daily operations.