Skip to footer content

How to Generate a QR Code Using C# with IronBarcode

In this tutorial, you'll learn how to generate QR codes using C# with the IronBarcode library, which is free for development. Begin by accessing the package manager console and installing the IronBarcode library using the command:

Install-Package BarCode

Once installed, navigate to the Program.cs file and include the using IronBarcode namespace.

To create a QR code, use the QRCodeWriter.CreateQrCode function, providing the desired text as an argument, such as 'ironsoftware.com'. Save the QR code in formats like JPEG, PNG, or others by specifying the path and filename. If needed, adjust the QR code's size by passing the required dimensions as a second argument. Additionally, IronBarcode allows you to add text below or above the QR code using AddBarcodeValueTextBelowBarcode and AddAnnotationTextAboveBarcode functions. To enhance the QR code with a logo, replace the create QR code function with CreateQrCodeWithLogo, passing the QR code value, logo file path, and size as arguments. Execute the program, and you'll find the generated QR code image in the output folder, complete with any added annotations, text, and logo. This tutorial provides a comprehensive approach to customizing QR codes, and for further assistance, a support team is available.

Further Reading: How to Generate a QR Code Using C# with IronBarcode

Jordi Bardia
Software Engineer
Jordi is most proficient in Python, C# and C++, when he isn’t leveraging his skills at Iron Software; he’s game programming. Sharing responsibilities for product testing, product development and research, Jordi adds immense value to continual product improvement. The varied experience keeps him challenged and engaged, and he says it’s one of his favorite aspects of working with Iron Software. Jordi grew up in Miami, Florida and studied Computer Science and Statistics at University of Florida.