IRONSOFTWAREHOME

How to Set QR Code Error Correction Levels

Curtis Chau
Curtis Chau
Updated: July 21, 2026

Take control of performance. Adjust error correction settings to create faster, more durable QR codes that can withstand damage and still scan reliably.

Error correction is what separates a QR code that falls apart from one that keeps working. When a printed label gets scratched, a sticker peels, or a poster fades in the sun, error correction determines whether the code still scans. IronQR allows developers to choose exactly how much resilience a QR code carries, from lightweight codes optimized for clean digital displays to heavy-duty codes built to survive warehouses and factory floors.

This guide demonstrates how to configure error correction levels using the IronQR library, balancing data density against damage tolerance for any use case. Developers new to generating QR codes should start with the Create QR Code as Image guide first.

Quickstart: Set QR Code Error Correction

Configure the error correction level via QrOptions and generate a resilient QR code.

  1. 1Install IronQR with NuGet Package Manager

    PM > Install-Package IronQR

  2. 2Copy and run this code snippet.

    var options = new QrOptions(QrErrorCorrectionLevel.Medium);
    var qrCode = QrWriter.Write("https://example.com", options);
    qrCode.Save().SaveAs("qr-medium.png");
    C#
  3. 3Deploy to test on your live environment

    Start using IronQR in your project today with a free trial
    arrow pointer

Understanding Error Correction Levels

QR codes use Reed-Solomon error correction to remain scannable even when partially damaged or obscured. The QrErrorCorrectionLevel enum in IronQR provides four levels, each trading data capacity for increased resilience:

LevelRecovery CapacityBest For
QrErrorCorrectionLevel.Low~7% damageDigital screens, controlled environments
QrErrorCorrectionLevel.Medium~15% damageGeneral-purpose use, moderate durability
QrErrorCorrectionLevel.High~25% damagePrinted materials, outdoor signage
QrErrorCorrectionLevel.Highest~30% damageIndustrial labels, harsh conditions

Higher error correction adds more redundancy modules, which increases the QR code's visual density. This also affects the size of the generated image, so developers may need to adjust dimensions accordingly. The lowest level that meets durability requirements keeps the code compact and fast to scan.

Setting Error Correction Level

To set the error correction level, pass the desired QrErrorCorrectionLevel value to the QrOptions constructor. Then pass these options to QrWriter.Write() when generating the QR code.

In this example, the error correction is set to Medium, which recovers up to 15% of damaged data while keeping the code compact.

using IronQr;
using IronSoftware.Drawing;

QrOptions options = new QrOptions(QrErrorCorrectionLevel.Medium);

// Create QR code
QrCode qr = QrWriter.Write("1234", options);

// Save QR code as a bitmap
AnyBitmap qrImage = qr.Save();

// Save QR code bitmap as file
qrImage.SaveAs("qrMedium.png");

Output

QR Code with Medium Error Correction

Comparing Error Correction Levels

Each level produces a visually different QR code. Lower levels generate simpler patterns that scan faster, while higher levels create denser patterns that survive more damage. Here's how to generate the same data at each level for comparison:

using IronQr;
using IronSoftware.Drawing;

string data = "https://ironsoftware.com";

// Low - ~7% recovery, smallest code
QrCode qrLow = QrWriter.Write(data, new QrOptions(QrErrorCorrectionLevel.Low));
qrLow.Save().SaveAs("qrLow.png");

// Medium - ~15% recovery, balanced
QrCode qrMedium = QrWriter.Write(data, new QrOptions(QrErrorCorrectionLevel.Medium));
qrMedium.Save().SaveAs("qrMedium.png");

// High - ~25% recovery, durable
QrCode qrHigh = QrWriter.Write(data, new QrOptions(QrErrorCorrectionLevel.High));
qrHigh.Save().SaveAs("qrHigh.png");

// Highest - ~30% recovery, maximum resilience
QrCode qrHighest = QrWriter.Write(data, new QrOptions(QrErrorCorrectionLevel.Highest));
qrHighest.Save().SaveAs("qrHighest.png");
Please note: Higher error correction levels increase the number of modules in the QR code, which makes the pattern denser. If scanning speed is a priority, the lowest level that meets the project's durability needs is recommended.

Output

QR Code with Low Error Correction

Low (~7% Recovery)

QR Code with Medium Error Correction

Medium (~15% Recovery)

QR Code with High Error Correction

High (~25% Recovery)

QR Code with Highest Error Correction

Highest (~30% Recovery)


Choosing the Right Level for the Use Case

The right error correction level depends on where the QR code will live and what it needs to survive:

Use CaseLevelWhyRelated Guide
Digital displays and websitesQrErrorCorrectionLevel.LowScreen is clean, lighting is controlled, no physical wear. Keeps the code simple and quick to scan.Create QR Code as Image
Business cards, flyers, and indoor signageQrErrorCorrectionLevel.MediumLight handling and minor creasing won't affect scanning. Pair with proper margins for best results.Add Margins to QR Code
Product packaging and outdoor postersQrErrorCorrectionLevel.HighMaterials face rain, UV exposure, and rough handling during shipping. Scale up size for distance scanning.Resize QR Code
Warehouse labels, factory floors, and industrial tagsQrErrorCorrectionLevel.HighestHarsh environments where codes get scratched, stained, or partially covered. Maximum redundancy keeps them working.Read QR Codes from Image

For more advanced QR code generation patterns, explore the C# QR Code Generator tutorial and the full IronQR feature set.

Frequently Asked Questions

What is the purpose of QR code error correction levels in IronQR?

QR code error correction levels in IronQR enhance the durability of QR codes, allowing them to remain scannable even when partially damaged. By configuring levels like Low, Medium, Quartile, and High, developers can ensure QR codes withstand different environmental conditions.

How do you set QR code error correction levels using IronQR?

To set QR code error correction levels using IronQR, create a QrOptions object with the desired QrErrorCorrectionLevel and use the QrWriter.Write method along with those options to generate the QR code.

What are the different error correction levels available in IronQR?

IronQR provides four error correction levels: Low (7% recovery), Medium (15% recovery), High (25% recovery), and Highest (30% recovery). Each level offers a trade-off between data capacity and resilience.

Which error correction level should be used for digital displays?

For digital displays, it's recommended to use QrErrorCorrectionLevel.Low, as the environment is controlled and there's no physical wear, enabling the QR code to remain simple and quick to scan.

How does higher error correction impact the QR code's appearance?

Higher error correction levels increase the number of redundancy modules, making the QR code's pattern denser. This can affect scanning speed and the overall size of the QR code image.

Can IronQR handle QR codes in harsh environments?

Yes, IronQR can generate QR codes suitable for harsh environments by setting the error correction level to Highest, which allows for up to 30% recovery of damaged data.

Why is it important to choose the correct error correction level for your use case?

Choosing the correct error correction level ensures that the QR code can survive the specific environmental conditions it will be exposed to, whether it is a clean digital display or an industrial setting with potential damage.

What is the default use case for QrErrorCorrectionLevel.Medium?

QrErrorCorrectionLevel.Medium is best suited for business cards, flyers, and indoor signage, where light handling and minor creasing may occur but won't significantly affect scanning.

How does IronQR help in generating resilient QR codes?

IronQR helps generate resilient QR codes by allowing developers to configure error correction levels that determine the QR code's capacity to recover from damage, enhancing its durability and reliability.

What should developers new to QR code generation start with?

Developers new to QR code generation should start by exploring the 'Create QR Code as Image' guide to understand the basics before delving into configuring error correction levels with IronQR.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...
Read More

Ready to Get Started?

Nuget Downloads 74,386Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronQR
nuget.org/packages/IronQR/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronQR"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronQR to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronQR.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required