Node-RED Barcode Scanner Node

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

Install from Manage palette

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

Open Flow Library
  1. 1

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

  2. 2

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

  3. 3

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

Processes WebAssembly sequentially in a single worker thread per Node-RED instance so other flows stay responsive.

Branch on decoded barcodes inside Node-RED flows

Process Buffers or file paths offline without stalling event loops, then route on msg.texts, msg.codes or catch.

Buffer or file path input

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

msg.payload, msg.texts & msg.codes

Populates msg.texts with exact barcode strings (leading zeros intact), msg.codes with symbology/base64 objects and msg.payload with the full report.

Dynamic overrides & catch errors

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

Test a barcode image in Node-RED

Save a known reference image, inject the message and confirm the decoded string character for character.

barcode-reference.png

Create a Code 128 barcode encoding 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 reads the file inside its worker thread and sets msg.texts to ["STOCK-4827"] together with msg.codes and msg.payload.

Sample output for barcode-reference.png.

Node-RED Barcode Scanner node questions

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

Go to Manage palette → Install and search for qrcode-barcode-scanner, or execute npm install @qrcode-ai-com/node-red-qrcode-barcode-scanner inside ~/.node-red and restart Node-RED. Check the Node-RED Flow Library or npm.

Node-RED 5.0 or newer and Node.js 22.9 or newer. Since the scanner runs via WebAssembly, no native compiler or host C library is required.

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

It puts the full engine report in msg.payload, decoded strings in msg.texts and structured code objects (with base64 raw bytes) in msg.codes while leaving other msg properties untouched. When no code is found, msg.texts is [] 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) inside the node editor, or override per message with msg.profile and msg.budgetMs.

Inputs are capped at 8 MiB, 4,096 pixels per side and 16 million total pixels. Corrupt, missing, unsupported-format or oversized inputs trigger errors handled 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 MIT-licensed (with retained Apache-2.0 notices for two reader components). Scanning executes offline on your host and never consumes QR Code AI generation credits.

Node-RED setup and Barcode Scanner references

Check the official listings and README for installation commands, input limits and supported formats.