IRONSOFTWAREHOME
Set QR Code Error Correction
using IronQr;
using IronSoftware.Drawing;

// 1. Medium Error Correction - balanced for general use
QrOptions mediumOptions = new QrOptions(QrErrorCorrectionLevel.Medium);

QrCode qrMedium = QrWriter.Write("1234", mediumOptions);
AnyBitmap qrMediumImage = qrMedium.Save();
qrMediumImage.SaveAs("qr-medium.png");

// 2. Highest Error Correction - maximum damage resilience
QrOptions highestOptions = new QrOptions(QrErrorCorrectionLevel.Highest);

QrCode qrHighest = QrWriter.Write("1234", highestOptions);
AnyBitmap qrHighestImage = qrHighest.Save();
qrHighestImage.SaveAs("qr-highest.png");
Imports IronQr
Imports IronSoftware.Drawing

' 1. Medium Error Correction - balanced for general use
Dim mediumOptions As New QrOptions(QrErrorCorrectionLevel.Medium)

Dim qrMedium As QrCode = QrWriter.Write("1234", mediumOptions)
Dim qrMediumImage As AnyBitmap = qrMedium.Save()
qrMediumImage.SaveAs("qr-medium.png")

' 2. Highest Error Correction - maximum damage resilience
Dim highestOptions As New QrOptions(QrErrorCorrectionLevel.Highest)

Dim qrHighest As QrCode = QrWriter.Write("1234", highestOptions)
Dim qrHighestImage As AnyBitmap = qrHighest.Save()
qrHighestImage.SaveAs("qr-highest.png")
NuGet Download
PM > Install-Package IronQR
Set QR Code Error Correction

Set QR Code Error Correction

Setting the right error correction level on a QR code determines how much physical damage it can withstand and still scan successfully. IronQR uses Reed-Solomon error correction with four levels: QrErrorCorrectionLevel.Low, QrErrorCorrectionLevel.Medium, QrErrorCorrectionLevel.High, and QrErrorCorrectionLevel.Highest. Choosing the appropriate level allows developers to balance between a compact, fast-scanning code and one built to survive scratches, stains, or partial obstruction.

5-step guide for setting QR code error correction

  • using IronQR;
  • using IronSoftware.Drawing;
  • QrOptions options = new QrOptions(QrErrorCorrectionLevel.Medium);
  • QrCode qr = QrWriter.Write("1234", options);
  • qr.Save().SaveAs("qr-medium.png");

Code Explanation

First, a QrOptions object is created by passing the desired QrErrorCorrectionLevel to its constructor. The Medium level is a solid default for most applications, recovering damaged data while keeping the QR code compact and quick to scan.

For environments where the code faces harsher conditions, such as warehouse labels or outdoor signage, switching to QrErrorCorrectionLevel.Highest provides maximum resilience at the cost of a denser pattern. The example generates both levels side by side for comparing the visual density. Once generated, the QR code is saved to a bitmap with Save() and exported to a PNG file with SaveAs().

Explore How to Set QR Code Error Correction Levels with IronQR.

Ready to Get Started?

Nuget Downloads 74,386Version:2026.9just released

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