# cozmo/jsqr

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/cozmo-jsqr).**

3,992 stars · 618 forks · TypeScript · apache-2.0

## Links

- GitHub: https://github.com/cozmo/jsQR
- Homepage: https://cozmo.github.io/jsQR/
- awesome-repositories: https://awesome-repositories.com/repository/cozmo-jsqr.md

## Topics

`qr` `qr-code` `qr-parsing-library` `qr-scanner` `qrcode` `qrcode-reader` `typescript`

## Description

jsQR is a JavaScript library for locating and decoding QR codes directly within a browser or Node.js environment. It functions as a client-side scanner and decoder that extracts text and data from images using pixel arrays, removing the need for server-side processing.

The library provides tools for QR code localization to identify the exact coordinates of corners and alignment patterns within a larger image. It uses image pattern recognition to isolate the QR code and extract its encoded content.

Its internal operations cover binarization-based thresholding, geometric pattern localization, and perspective transformation mapping to normalize skewed images. It also utilizes Reed-Solomon error correction to recover corrupted data bits and version-based grid sampling to determine module layout.

## Tags

### Part of an Awesome List

- [QR Codes](https://awesome-repositories.com/f/awesome-lists/devtools/qr-codes.md) — Provides a full implementation for decoding QR code payloads from images using JavaScript. ([source](https://cdn.jsdelivr.net/gh/cozmo/jsqr@master/README.md))
- [Localization](https://awesome-repositories.com/f/awesome-lists/devtools/qr-codes/localization.md) — Identifies the exact coordinates of corners and alignment patterns to locate a QR code within an image. ([source](https://cdn.jsdelivr.net/gh/cozmo/jsqr@master/README.md))
- [Browser-Based Scanners](https://awesome-repositories.com/f/awesome-lists/devtools/qr-codes/browser-based-scanners.md) — Enables QR code scanning directly within web browsers to trigger workflows without native applications.
- [Image Processing](https://awesome-repositories.com/f/awesome-lists/media/image-processing.md) — Pure JavaScript QR code reader.

### Artificial Intelligence & ML

- [Pattern Recognition](https://awesome-repositories.com/f/artificial-intelligence-ml/pattern-recognition.md) — Uses pattern recognition to identify the physical coordinates and markers of QR codes in images.

### Graphics & Multimedia

- [Geometric Pattern Localization](https://awesome-repositories.com/f/graphics-multimedia/geometric-pattern-localization.md) — Identifies finder patterns and alignment markers to determine the QR code position and rotation.
- [Image Processing](https://awesome-repositories.com/f/graphics-multimedia/image-editing-processing/image-processing.md) — Processes raw image pixel arrays to identify luminance transitions for QR code detection.
- [Perspective Warping](https://awesome-repositories.com/f/graphics-multimedia/perspective-warping.md) — Performs geometric perspective transformations to correct skew and normalize QR code pixels into a square grid.

### Security & Cryptography

- [Error Correction Codes](https://awesome-repositories.com/f/security-cryptography/error-correction-codes.md) — Utilizes Reed-Solomon error correction to recover corrupted data bits caused by noise or image damage.

### Web Development

- [Client-Side Media Processing](https://awesome-repositories.com/f/web-development/client-side-media-processing.md) — Processes and decodes QR code images entirely on the client side without requiring server-side uploads.

### Mobile Development

- [QR Code Scanner Libraries](https://awesome-repositories.com/f/mobile-development/camera-libraries/qr-code-scanner-libraries.md) — Provides a JavaScript-based scanner implementation for decoding QR codes in browser environments.
