iCheck QR LogoiCheck QR Logo

Generate anti-counterfeit QR codes using blockchain technology

Knowledge
May 28, 2025 - 10:10 AM
Share:

Traditional QR Code simply contains static information,easily copied and counterfeiting damages the reputation and safety of the brand because there is no mechanism to authenticate the origin. This poses a big challenge in protecting the brand and ensuring the rights of consumers. To solve this problem, Integrating blockchain technology into QR codes opened a new direction, each QR code is linked to 1 record unchangeable, ensuring the integrity and authenticity of product data.

1. What is Blockchain Anti-Counterfeit QR Code

Anti-counterfeit QR code using Blockchain is the QR code link to original data of the product has been recorded, verified and stored on the Blockchain system.

Each product will have a unique QR code, when scanned, it will retrieve "original" information such as: place of manufacture, batch, time, certification, shipping route... cannot be edited or faked.

Illustration Scan QR code - Call Blockchain - Display data

2. General process of creating anti-counterfeit QR codes using Blockchain technology

Step 1: Collect product data.

Core information such as:

  • Product name, Production date - expiry date, Location/place of production

  • Batch number – bill of lading code – inspection unit

  • Production process – quality certification

→ Data must be accurate, consistent and authenticated from the original supplier.

Step 2: Record product information on Blockchain (hashing/recording).

  • The data is “hash”(encrypted) or written directly to the Blockchain network (như Ethereum, Hyperledger, Polygon...).

  • One Unique ID(Transaction ID or Block hash) will be generated representing the product information.

  • Information on the Blockchain is immutable, public, cannot be modified after recording.

Step 3: Generate QR code containing Blockchain ID

QR codes are generated to:

  • Retrieve Product ID on Blockchain

  • Link to a blockchain explorer or intermediary API that displays product information from the data block

  • Can add brand logo, multi-layer security elements (OTP code, hidden image, biometric verification…)

Step 4: Print QR code on product.

  • QR codes are pasted/printed directly on packaging, anti-counterfeit stamps, labels, etc.

  • Consumers just need to use their smartphone to scan the QR code to check the entire traceability history on the Blockchain: Is it consistent, modified, and correct from the place of manufacture - distributor?

4-step process to create Blockchain QR Code

3. Ways to implement Blockchain QR code

Method

Describe 

Real life example

Using Blockchain - as - a - Service (BaaS) platform

Businesses do not need to build their own Blockchain infrastructure.

Use third-party "Blockchain as a platform" services like IBM Blockchain, OriginTrail to record, retrieve data and generate QR codes.

Fast, convenient, cost-effective engineering.

Certification of luxury products, clean food

Build your own blockchain system

Enterprises proactively develop their own Blockchain networks or fork from open source platforms (such as Ethereum, Hyperledger).

Full chain control: security, verification rules, industry-specific customization.

Complicated, costly, suitable for large enterprises

Vinamilk, Everledger, De Beers

4. Detailed instructions on how to create a basic Blockchain QR code

 4.1. Using Blockchain-as-a-Service platform

Steps to follow:

Step 1: Register an account on the BaaS platform:
For example: VeChain ToolChain, IBM Food Trust, OriginTrail

Step 2: Record product data on Blockchain:

  • Enter information:batch code, production date, origin, ingredients, serial number,...

  • The system automatically writes to the blockchain and generates a transaction code (transaction ID or hash).

Step 3: Get transaction ID from blockchain

This ID is the address that leads to the uneditable authentication data.

Step 4: Generate QR code

  • Use a QR generator (free or built into a BaaS platform).
  • Embed the transaction ID or blockchain explorer link.

Step 5: Print QR code on product packaging or label

Sticker form or printed directly onto packaging.

4.2. Build your own custom solution

Step 1: Write Smart Contract on Ethereum, BSC or Hyperledger

  • Use Solidity (Ethereum/BSC) or Chaincode (Hyperledger).

  • Smart contracts can contain:Product name, batch code / product code, production date / date of record, encryption (SHA256 hash) of verification information

Step 2: Deploy Smart Contract

  • Deploy to testnet (Goerli, Sepolia for Ethereum or BSC testnet).

  • Use Metamask wallet to confirm transaction deployment.

  • Get contract address and transaction ID (TxID).

Step 3: Record product information into Smart Contract

  • Call the write data function (addProduct) via web interface or DApp.

  • Data is saved and cannot be edited after recording.

Step 4: Generate QR code containing access address

Use generator to generate QR code:

  • QR contains query link to smart contract viewer (Etherscan, BscScan).

  • Or QR leads to internal API that displays information more beautifully (using Node.js, React...).

Step 5: Print QR code on product

Stick the QR code on packaging, fragile stamps, NFC tags, or attach an electronic certificate.

Customers scan to:

  • Check product information from Blockchain

  • Know the origin of the product with real verification.

5. Outstanding advantages when using QR Blockchain to prevent fraud

Absolute transparency: immutable data:Each product when recorded on the Blockchain comes with a code (hash) and a specific time.Cannot be edited good counterfeit after recording – transparent in every step.

Easy product traceability:Just one QR scan ➜ the entire supply chain is visible on the blockchain. Scalable across the chain:from raw materials → production → packaging → distribution.

Building trust with customers:Instead of relying solely on “advertising” or “paper stamps”, users directly verify informationIncrease trust and brand loyalty – especially with highly conscious consumers.

Protect your brand from counterfeiting : Each QR code is unique and recorded on the Blockchain – difficult to copy or reuse.

6. Challenges in implementing Blockchain QR codes

Challenge 

Reason 

Solution 

Implementation costs

- Blockchain transaction fee (gas fee)

- Backend system operating fee

-Switch to a cost-effective blockchain like Polygon, BSC, or Layer 2 like Arbitrum

Limited user awareness

- Traditional consumer habits

- Attach clear, intuitive QR scanning instructions on packaging, POSM, or demo videos

Big data size

- Blockchain does not store large files (PDFs, photos, videos, etc.)

-Save hash + metadata instead of full file

-Integrate IPFS/Arweave for off-chain storage


7. Practical application: Businesses have successfully implemented

VeChain + Walmart China

Walmart China partners with VeChain to track the origin of meat, vegetables, and seafood. Each product has a QR code linked to Blockchain data that records the supply chain from farm → cold storage → supermarket.

The Beers

Use QR Blockchain to authenticate each diamond mined, polished and sold. Combine De Beers' Tracr™ technology to permanently record data on the blockchain.

Everledger

Attach a QR code on the wine bottle that connects to blockchain data: vintage, place of production, ownership history. Use hashes to ensure information integrity.

8. Future development: Blockchain + QR + AI

Applying AI to automatically check and verify QR Blockchain.

Features: AI can automatically scan QR codes from cameras, check validity by calling queries to Blockchain data.

  • Users do not need complicated operations.

  • Detect fake/tampered code with machine learning AI.

  • Suggested warnings for consumers/supply chain regulators.

Using Blockchain Layer 2 to optimize the cost of creating anti-counterfeit QR codes.

Current issue:
Layer 1 Blockchains (like Ethereum) have high gas fees, limit transaction speeds, and are not optimized for small batches of QR codes.
Solution :
Use Layer 2 applications such as Polygon, Arbitrum, Optimism for fast, low-cost data recording. Layer 2 layers can store batch data and periodically confirm to Layer 1.
Effective: Hundreds of thousands of anti-counterfeit Blockchain QR codes can be generated at extremely low cost → feasible for even small businesses.


QR Code image combines Blockchain and AI

9. FAQ – Frequently Asked Questions

Which Blockchain is Best for Anti-Counterfeiting QR?

Platforms like VeChain, Ethereum, and Hyperledger are all suitable, depending on the needs and size of the business.

If I lose the QR code, will I lose the blockchain data?

Are not. The data is still stored on the blockchain. However, since the QR code is the means to access the data, it is important to protect the QR code from loss or damage.

How can normal users verify?

Consumers can use smartphones to scan QR codes and access product information stored on the blockchain through apps or web browsers.

Conclude

Fake QR codes using Blockchain technology help protect commercial efficiency thanks to transparency, immutability and the ability to accurately trace origins. This solution enhances consumer confidence and prevents counterfeiting, and is suitable for businesses large and small. With the development of Layer 2 technology and AI, Blockchain QR encryption will become more and more popular and effective in the future.

Last update: October 28, 2025 - 9:25 AM

iCheckQR Team

iCheckQR Team

Content compiled by the iCheckQR team, specializing in encoding, QR codes, and digital product applications. We are committed to providing accurate, easy-to-understand, and useful information tailored to the practical implementation needs of users.

Make a QR code for your daily use.

You May Also Like