Node-RED Barcode Scanner Node

Read 1D and 2D barcodes from image Buffers or file paths on your Node-RED host in a worker thread, keeping leading zeros intact in msg.texts and msg.codes.

Install from Manage palette

Requires Node-RED 5.0+ and Node.js 22.9+. No native compiler required.

Open Flow Library
  1. 1

    Open Menu → Manage palette → Install in Node-RED and search for qrcode-barcode-scanner.

  2. 2

    Install @qrcode-ai-com/node-red-qrcode-barcode-scanner and drag qr & barcode scan from parser.

  3. 3

    Wire a Buffer or file path, or import the starter flow via Menu → Import → Examples → scan-image.

Runs WebAssembly sequentially in one worker thread per Node-RED process so other flows remain responsive.

Route decoded barcodes inside Node-RED flows

Decode Buffers or paths offline without blocking event loops, then branch on msg.texts, msg.codes or catch.

Buffer or file path input

Reads msg.payload (or any configured Image property) accepting PNG, JPEG, WebP or GIF Buffers from file in, HTTP or MQTT, or a file path.

msg.payload, msg.texts & msg.codes

Writes exact barcode strings (leading zeros preserved) to msg.texts, symbology/base64 objects to msg.codes and the full report to msg.payload.

Dynamic overrides & catch errors

Override fast (800 ms default) per message with msg.profile and msg.budgetMs; corrupt or oversized inputs (>8 MiB, 4,096 px) route to catch.

Try a barcode image in Node-RED

Prepare a known test image, run the scan and verify the returned value character by character.

barcode-reference.png

Create a Code 128 barcode containing STOCK-4827 and save it as barcode-reference.png.

Send an image message to qr & barcode scan

JSON
{
  "payload": "barcode-reference.png",
  "profile": "fast",
  "budgetMs": 0
}
Expected result · Code 128
STOCK-4827

Node-RED decodes the file in its worker thread and sets msg.texts to ["STOCK-4827"] alongside msg.codes and msg.payload.

Example result for barcode-reference.png.

Node-RED Barcode Scanner node questions

Node-RED 5.0+ requirements, Buffer vs path inputs, per-message overrides, limits and licensing.

Open Manage palette → Install and search for qrcode-barcode-scanner, or run npm install @qrcode-ai-com/node-red-qrcode-barcode-scanner inside ~/.node-red and restart Node-RED. See the Node-RED Flow Library or the npm package.

Node-RED 5.0 or later and Node.js 22.9 or later. Because the scanner engine runs as WebAssembly, no native compiler or host C library is required.

Yes. By default it reads msg.payload (configurable in the Image field), accepting either a Buffer of PNG, JPEG, WebP or GIF bytes (from file in, http request or MQTT) or a file path string.

It writes the complete engine report to msg.payload, decoded strings to msg.texts and structured detections (including base64 raw bytes) to msg.codes whilst preserving other msg properties. An empty image returns msg.texts as [] with status no code.

Profile defaults to fast (800 ms budget, reduced quality score). You can switch to frame (80 ms, no score) or full (4000 ms, full score) in the node editor or override per message via msg.profile and msg.budgetMs.

Images are capped at 8 MiB, 4,096 pixels per side and 16 million total pixels. Corrupt, missing, unknown-format or oversized inputs raise errors caught by a standard Node-RED catch node (such as QRS-001 or QRSCAN_INPUT_LIMIT).

Yes. Both the node and its WebAssembly engine dependency are free and open source under the MIT licence (with retained Apache-2.0 notices for two reader parts). Scanning runs offline on your host and never uses QR Code AI generation credits.

Node-RED setup and Barcode Scanner references

Consult the official listing and README for installation details, limits and supported formats.