How to Add a Logo to QR Codes
Adding a logo to your QR code transforms a standard pattern into a branded asset. Companies use logo-embedded QR codes on marketing materials, product packaging, and digital campaigns to reinforce brand recognition while maintaining full scannability.
IronQR supports embedding logos through the QrLogo class and the Logo property in QrStyleOptions. The QrLogo constructor accepts parameters for width, height, and corner radius, giving you control over how the logo appears.
In this guide, we'll show you how to embed a logo into your QR codes using IronQR in C#.
Quickstart: Add a Logo to a QR Code
Load a logo image, attach it to QrStyleOptions, and save the branded QR code.
-
Install IronQR with NuGet Package Manager
PM > Install-Package IronQR -
Copy and run this code snippet.
var qrCode = QrWriter.Write("https://example.com"); var logo = new QrLogo(AnyBitmap.FromFile("logo.png"), 50, 50, 5); var style = new QrStyleOptions { Logo = logo }; qrCode.Save(style).SaveAs("qr-with-logo.png"); -
Deploy to test on your live environment
Start using IronQR in your project today with a free trial
Minimal Workflow (5 steps)
- Download the C# library to create QR codes with embedded logos
- Load your logo image using
AnyBitmap.FromFile - Create a
QrLogowith size and corner radius parameters - Configure
QrStyleOptionswith theLogoproperty - Save the branded QR code using
SaveAs
Embed a Logo in a QR Code
To add a logo, load your image using AnyBitmap.FromFile, then create a QrLogo object specifying the width, height, and corner radius. Assign it to the Logo property in QrStyleOptions.
For best results, use a square logo with a transparent or white background. The corner radius parameter allows you to round the logo edges for a polished look.
:path=/static-assets/qr/content-code-examples/how-to/add-custom-logo-qr-code.cs
using IronQr;
using IronSoftware.Drawing;
// Load new logo image
AnyBitmap logo = AnyBitmap.FromFile("sample.png");
// Add new logo to QR code style options
QrStyleOptions styleOptions = new QrStyleOptions()
{
Logo = new QrLogo(logo, 0, 0, 10),
Dimensions = 500,
};
// Create QR code with URL data
QrCode qr = QrWriter.Write("https://ironsoftware.com/csharp/qr/");
// Save QR code as a bitmap
AnyBitmap qrImage = qr.Save(styleOptions);
// Save QR code bitmap as file
qrImage.SaveAs("qrURLWithLogo.png");
Imports IronQr
Imports IronSoftware.Drawing
' Load new logo image
Dim logo As AnyBitmap = AnyBitmap.FromFile("sample.png")
' Add new logo to QR code style options
Dim styleOptions As New QrStyleOptions() With {
.Logo = New QrLogo(logo, 0, 0, 10),
.Dimensions = 500
}
' Create QR code with URL data
Dim qr As QrCode = QrWriter.Write("https://ironsoftware.com/csharp/qr/")
' Save QR code as a bitmap
Dim qrImage As AnyBitmap = qr.Save(styleOptions)
' Save QR code bitmap as file
qrImage.SaveAs("qrURLWithLogo.png")
Output
What's Next?
Once your logo is in place, consider adjusting the QR code colors to match your brand palette, adding margins for cleaner scanning at smaller sizes, or setting error correction levels to ensure the code stays readable with a larger logo overlay.
Frequently Asked Questions
What is the benefit of adding a logo to a QR code?
Adding a logo to a QR code can transform a standard pattern into a branded asset, enhancing brand recognition on marketing materials, product packaging, and digital campaigns while maintaining full scannability.
How can I embed a logo into my QR code using IronQR?
With IronQR, you can embed a logo by using the `QrLogo` class and the `Logo` property in `QrStyleOptions`. You can load your logo image, attach it to `QrStyleOptions`, and save the branded QR code.
What parameters can I set when creating a QrLogo in IronQR?
When creating a `QrLogo` in IronQR, you can set parameters for width, height, and corner radius, giving you control over the appearance of the logo in your QR code.
What type of logo is best for embedding in a QR code?
For best results, it is recommended to use a square logo with a transparent or white background. This ensures that the logo integrates well with the QR code design.
Can I adjust the appearance of my QR code after adding a logo?
Yes, after embedding a logo, you can further customize your QR code by adjusting its colors to match your brand palette, adding margins, or setting error correction levels using IronQR.
Is it possible to round the edges of the logo in a QR code?
Yes, you can round the edges of the logo in a QR code by specifying the corner radius parameter when creating a `QrLogo` object in IronQR.
What is the minimal workflow to add a logo to a QR code using IronQR?
The minimal workflow involves downloading the C# library, loading your logo image with `AnyBitmap.FromFile`, creating a `QrLogo` with size and corner radius, configuring `QrStyleOptions` with the `Logo` property, and saving the QR code using `SaveAs`.
How do I start using IronQR for creating logo-embedded QR codes?
To start using IronQR for creating logo-embedded QR codes, first download the C# library from NuGet, then follow the steps to load your logo, create a `QrLogo`, configure `QrStyleOptions`, and save your QR code.

