A pure JavaScript library for reading QR codes from raw image data in browsers and Node.js.
jsQR is a pure JavaScript library that decodes QR codes from raw image data. It takes RGBA pixel arrays, locates QR codes within images, extracts them, and parses their content without requiring external dependencies. It solves the problem of adding QR code scanning functionality to web applications, Node.js backends, or browser extensions without relying on native APIs or plugins.
JavaScript developers needing QR code reading capabilities in web apps (e.g., for webcam scanning or file uploads) or Node.js services processing images. It's also suitable for library authors who want to embed QR decoding without heavy dependencies.
Developers choose jsQR because it's lightweight, dependency-free, and works identically across browsers and Node.js. Its pure JavaScript implementation ensures consistent behavior, and its detailed output (including QR code location points) provides flexibility for advanced use cases beyond basic decoding.
A pure javascript QR code reading library. This library takes in raw images and will locate, extract and parse any QR code found within.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written entirely in JavaScript with no external dependencies, ensuring it runs consistently in any environment from Node.js to browsers without platform-specific bloat.
Accepts raw RGBA pixel arrays (Uint8ClampedArray), allowing integration with various sources like webcam streams, uploaded files, or server-side image processing modules such as 'jpeg-js' or 'pngjs'.
Returns not just decoded data but also QR code metadata like version, chunks, and precise location points (e.g., corners and finder patterns), useful for advanced applications like overlay graphics or analytics.
Works identically across Node.js, web browsers, and with modern bundlers like Webpack, making it versatile for full-stack JavaScript projects without additional configuration.
The default 'inversionAttempts' option is set to 'attemptBoth', which causes a ~50% performance degradation, and the README notes this may change in future versions, impacting long-term stability and speed.
Does not include utilities to load or convert images; developers must handle converting images to the required Uint8ClampedArray format themselves, adding boilerplate code and complexity for simple use cases.
Focuses exclusively on QR code decoding, so it cannot read other barcode formats like Code 128 or DataMatrix, which may necessitate additional libraries for broader scanning needs.