Dify Barcode Scanner Plugin

Decode every 1D and 2D barcode from a user-uploaded image straight inside your Dify plugin runtime. Pull exact identifiers with leading zeros preserved and no API key.

Install via Dify Marketplace

Executes inside Dify's Python 3.12 plugin runtime (amd64 and arm64, 512 MiB). No API key required.

Open Dify Marketplace
  1. 1

    Inside Dify, navigate to Plugins → Marketplace and search for QR Code & Barcode Scanner.

  2. 2

    Choose Install. Signed Marketplace packages run on both Dify Cloud and self-hosted setups with default configuration.

  3. 3

    Drop Scan QR codes and barcodes (scan_image) into a workflow or agent and map an uploaded image file.

Fetches the uploaded image from Dify's file service, retains no copies and never forwards files to external endpoints.

Decode uploaded barcodes right inside Dify workflows

Swap out vision-model approximations for exact local decoding, clean workflow variables and predictable error routing.

Workflows & Agent uploads

Connect Scan QR codes and barcodes (scan_image) to PNG, JPEG, WebP or GIF uploads up to 16 MiB, 4,096 px per side and 16 MP.

texts, count & complete variables

Outputs exact barcode strings (preserving leading zeros) inside texts, along with count, complete and the raw JSON report without external lookups.

QRS- failure branching

Blank images return count 0 cleanly; corrupt or oversized uploads raise a QRS- error code so workflows can trigger a fallback branch.

Try a barcode image in Dify

Create a known reference image, run the tool call and check the decoded string character by character.

barcode-reference.png

Create a Code 128 barcode encoding STOCK-4827 and save the file as barcode-reference.png.

Run scan_image in Dify

Text
# Tool: Scan QR codes and barcodes (scan_image)
image:     barcode-reference.png (user upload)
profile:   fast
budget_ms: 0
# Output -> texts: ["STOCK-4827"], count: 1, complete: true
Expected result · Code 128
STOCK-4827

Dify reads the uploaded label locally inside its plugin runtime and writes the exact Code 128 string into texts without invoking an LLM.

Sample output for barcode-reference.png.

Dify Barcode Scanner plugin questions

Marketplace setup, self-hosted .difypkg packaging, output variables, image limits and privacy.

Inside Dify, go to Plugins → Marketplace, look up QR Code & Barcode Scanner and press Install. You can also view the official entry on Dify Marketplace.

No. The open-source Rust and Python engine executes locally inside your Dify plugin runtime on Python 3.12, so reading images needs no vision model, no QR Code AI account and no API key.

Yes. Package the source folder using dify plugin package ./qrcode-barcode-scanner-dify to generate a .difypkg archive, add FORCE_VERIFYING_SIGNATURE=false inside docker/.env for unsigned local packages, restart Dify and upload it via Install plugin → Local package file.

It outputs a one-line text summary, the full unmodified engine JSON report and three workflow variables: texts (decoded strings), count (total codes found) and complete (false whenever budget_ms stops the scan early).

A single PNG, JPEG, WebP or GIF file per call, capped at 16 MiB, 4,096 pixels per edge and 16 million total pixels. Oversized or corrupt uploads fail with a QRS- error code so workflows can direct them down a failure branch.

Yes. It reads 16 barcode symbologies directly inside Dify's runtime, preserving every digit and leading zero inside texts without querying external retail, courier or ISBN databases.

Yes. Both the plugin source and current PyPI engine wheel are MIT-licensed and free to run, completely separate from QR Code AI generation credits or paid plans.

Dify setup and Barcode Scanner references

Refer to the official marketplace page and README for installation steps, image limits and supported formats.