Pharmaceutical
6 min read
by Mike Baird

What is QR code error correction? How ECC keeps codes scannable and reliable

QR codes: small squares, big responsibilities

QR codes are so woven into daily life that we barely notice them — until they stop working. Originally developed in 1990s Japan by an engineer at a Toyota subsidiary to track car parts, these compact, square codes now show up everywhere: on medication packaging and shipping labels, in marketing campaigns, on restaurant menus, and even floating over TV newscasters’ shoulders.

They connect the physical and digital worlds with a quick scan, enabling everything from payment systems and product traceability to e-labeling in highly regulated industries like healthcare and pharmaceuticals. In some markets, a readable QR code is even a legal requirement for compliance.

But all of this depends on one crucial thing: readability. If a QR code can’t be scanned — because it’s scratched, smudged, partially covered, or printed poorly — its purpose is lost.

That’s where one of the most powerful (and most overlooked) features of QR codes comes into play: error correction.

What is QR code error correction?

Error Correction Codes (ECC) make QR codes more forgiving — allowing them to be scanned even if they’re damaged, dirty, or partially obscured.

A good example of this is the “intelligent pre-empting” we often notice while holding our mobile devices to a QR code. Depending on the quality of the code and level of error correction, our devices will often recognize the code before we have centred it steadily on the pattern. Even when only part of a QR code is scanned, or if the QR code is partially scratched, blurred, or covered, the missing data can often be reconstructed, allowing the QR code to remain scannable.

If you find algorithms cute – we know there are a few of you out there – you will like this part. To remain scannable, QR codes use the so-called Reed-Solomon algorithm, a mathematical method that adds redundancy to the stored information. It’s also used in CDs and DVDs, among many other things. [1]

Note on datamatrix codes

While this article focuses on QR codes, it’s worth mentioning their close cousin: DataMatrix. These 2D barcodes are widely used in regulated industries such as pharmaceuticals, medical devices, and logistics, and they also rely on Reed–Solomon error correction. However, they do so in a slightly different way.

For DataMatrix codes, the error correction component, known as ECC 200, is built directly into the symbol’s structure rather than being selectable at different levels as it is with QR codes. This means the error correction process is always active but not configurable, which is why tools like TVT Barcode don’t display an ECC “level” for DataMatrix codes in the same way they do for QR.

The principle, however, remains the same: redundancy is added to the encoded data, allowing scanners to reconstruct missing or damaged information and keep codes readable under real-world conditions.

The four levels of error correction

QR codes offer four standardized error correction levels, each balancing the amount of data stored against QR code resilience. The less the quantity of data stored, the higher the potential level of resilience.

  • Level L (Low, approx. 7% recovery)
    Stores the most data but offers the least protection.
  • Level M (Medium, approx. 15% recovery)
    A balance between storage and reliability; often the default.
  • Level Q (Quartile, approx. 25% recovery)
    Provides greater robustness, useful in environments where damage is likely.
  • Level H (High, approx. 30% recovery)
    Maximizes error correction, allowing the code to remain readable even with significant damage, but reduces the total amount of data that can be stored.

In short, higher levels of error correction increase reliability but decrease storage capacity, while lower levels maximize storage but allow better code readability. The advantage of these different levels of trade-off is that QR codes can be optimized for different use cases.

Why error correction matters in the real world

In controlled lab conditions, any QR code will scan perfectly. In real life, it’s another story.

  • Labels tear in transit.
  • Menus get greasy fingerprints.
  • Phone screens crack.
  • Stickers peel off.
  • And sometimes, hands shake while scanning.

By storing redundant data, ECC allows a QR code to “fill in the gaps” when part of it is missing, illegible or obscured. In many cases, a damaged QR code can still be decoded successfully by a scanner.

For example:

  • A delivery label with a corner torn off may still scan correctly.
  • A restaurant menu QR code printed on a glossy surface may remain scannable despite scratches or the grease of sticky fingers.
  • A ticket QR code on a phone screen can still work even if part of the display is cracked.

Furthermore, ECC compensates for the fallibility of a human user. With the increasing use of QR codes for electronic labeling, for example, a situation may arise where a patient with trembling hands – whether due to age or disease –may wish to scan a product for further information. In another case, the user may need to scan an object that is suspended and perhaps still in motion.

But how do you know that your QR code meets the requirements – the built-in trade-off – required for the product or circumstances? Take heart, with the “rabbit”, there no need to fly blind.

How TVT barcode brings error correction into view

Despite its importance, ECC often remains invisible. Most businesses generating QR codes don’t know what level of error correction they’re using — or whether it’s appropriate — until a scan fails.

That’s where TVT Barcode from Schlafender Hase changes the game. It not only decodes QR codes but also reveals the error correction level clearly and instantly. That visibility transforms ECC from a “hidden feature” into a measurable quality factor.

With TVT Barcode, organizations gain:
  • Transparency: Instantly verify the robustness of your QR codes.
  • Control: Enforce specific ECC levels for critical applications (e.g., medical packaging, payment systems).
  • Confidence: Know your QR codes meet industry standards before they hit the field.

And because TVT Barcode supports both ISO and GS1 standards, it ensures compliance across industries and geographies.

Practical Advantages for QA Teams and Developers

By making ECC levels visible, TVT Barcode delivers practical advantages for both quality assurance (QA) teams and developers:

  • Improved verification in QA

During printing or packaging inspections, QA teams can instantly verify whether codes meet the required error correction level. This helps identify weak or unreliable codes early, reducing costly reprints and preventing later failures in the field.

  • Smarter ECC Selection for Critical Applications

Not all use cases are equal. A marketing campaign might prioritize maximum storage at Level L, while medical packaging or payment systems demand resilience at Level H. TVT Barcode empowers QA teams and developers to make informed decisions, ensuring the right ECC level is chosen for each scenario.

  • Supports Standards Compliance

By aligning with both ISO and GS1 standards, TVT Barcode supports compliance and provides transparency and a higher standard of quality assurance. Teams can document ECC levels as part of their validation process, showing whether a QR code meets the required standard for the industry or use.

In short, TVT Barcode transforms ECC from a hidden feature into a measurable quality metric, giving QA teams and developers the tools they need to ensure reliability, efficiency, and compliance. It verifies the readability of barcodes — both 1D and 2D (QR or matrix) — through an overall pass/fail grading system, while also providing detailed diagnostic feedback on the specific factors behind that result.

Rather than offering a simple binary outcome, TVT Barcode shows why a code passed or failed, breaking performance down into key ISO-based parameters. For 2D codes, that includes metrics such as axial non-uniformity (distortion along the X and Y axes), grid non-uniformity (alignment accuracy), ECC integrityfixed pattern or format information damageprint growth, and quiet zone compliance.

This deeper visibility means QA teams aren’t left guessing. They can pinpoint the root cause of a failure, take targeted corrective action, and strengthen their processes — all before a code ever reaches the field.

ECC is more than a technical solution – it’s strategic

Though often treated “merely” as a hidden technical detail in the production process, in practice, Error Correction Codes (ECC) are a strategic factor in ensuring the reliability and readability of a QR code. By making ECC levels visible, TVT Barcode shifts error correction from being an invisible safeguard to a measurable and controllable factor integrated into your quality assurance.

In this regard, the visibility of the ECC goes beyond diagnostics – it’s about building trust, ensuring compliance, and making smarter quality and strategy decisions based on recognized metrics. For businesses, it leads to greater confidence in the reliability and of the QR code in question for the product in question. For developers and QA teams, it provides the tools to optimize resilience without guesswork.

In a world where QR codes connect critical processes – and especially in a healthcare where QR codes are playing an important role in public health and safety – calling in the Rabbit from Schlafender Hase to validate the strength of your error correction is your strategic advantage.

Would you like to find out more about how TVT promotes visibility, usability and compliance in the use of QR codes? Contact us today.