Create QR Code
using IronBarCode;

// The value of the QR code as a string. Also suitable for URLS
string value = "https://ironsoftware.com/";

// Simplest example of creating a QR Code with no settings
GeneratedBarcode myQRCode = QRCodeWriter.CreateQrCode(value);

// Advanced example with all parameters exclusive to QR codes set:

// The error correction level of the QR code
var correction = QRCodeWriter.QrErrorCorrectionLevel.Highest;

// The width and height of the QR code in pixels
int size = 500;

// QR version.
// Please read https://www.qrcode.com/en/about/version.html to learn more about what QR version is
int qrVersion = 0;

GeneratedBarcode myQRCodeComplex = QRCodeWriter.CreateQrCode(value, size, correction, qrVersion);
NuGet Download
PM > Install-Package BarCode
Create QR Code

Create QR Code

IronBarcode offers developers intuitive and easy-to-use methods to create unique QR codes with a plethora of customizations. Whether you are a developer looking for a simple QR code generator with a few lines of code or a more complex generator where you can control all aspects of the QR code, such as the correction level, size, and version, IronBarcode offers everything you need in one library.

After importing the IronBarcode library, we first instantiate the QRCodeWriter class and then use QRCodeWriter.CreateQrCode to create a new QR code with a string value of a URL. This method is the simplest way to create a QR code with default settings.

We can adjust the QR code's errorCorrectionLevel for more customization. This level correlates to the amount of redundancy or error recovery data included in the QR code, making it more fault-tolerant and ensuring it works under harsh conditions.

To control the size, simply assign an integer value to it. The qrVersion (between 1 and 40) represents the QR code version. Depending on how much data you wish to store and the capacity you want the QR code to have, developers can fine-tune it to balance between capacity and size to ensure optimization. For more information on how to determine the version of your QR code, please refer to this documentation here.

Finally, we pass all our established variables, size, qrVersion, and correction, to the QRCodeWriter.CreateQrCode method again to generate a customized QR code with all the attributes listed above.

Explore How to Create Custom Barcode Images
View on GitHub

Ready to Get Started?

Nuget Downloads 2,540,041Version:2026.11just released