How to Resize a QR Code Image

Proper scaling keeps QR codes scannable across print and digital formats. Accurate dimensions prevent blurring and ensure clear readability.

In this how-to guide, we will explore how the resizing of a QR code is performed using IronQR.

Resizing QR Code

To create a custom-sized QR code for print or signage, set the Dimensions property to a specific value, then save the generated QR code with the QrStyleOptions applied.

In the example, we create a QR code from a URL, apply a custom size of 500 pixels using the Dimensions property of the QrStyleOptions class, and save the resized QR code as a PNG.

Please noteThe Dimensions property provides a direct 1:1 mapping; the integer you define becomes the exact pixel width and height of the final output.

:path=/static-assets/qr/content-code-examples/how-to/resize-qr-code.cs
using IronQr;
using IronSoftware.Drawing;

string url = "https://ironsoftware.com/csharp/qr/";

// Generate the QR code data
QrCode qr = QrWriter.Write(url);

// Save using default dimensions
AnyBitmap qrDefault = qr.Save();
qrDefault.SaveAs("qr-default-size.png");

// Define custom resizing
QrStyleOptions styleOptions = new QrStyleOptions
{
    Dimensions = 500
};

// Save using the style options
AnyBitmap qrResized = qr.Save(styleOptions);
qrResized.SaveAs("qr-resized.png");
$vbLabelText   $csharpLabel

Original

Large QR code

Resized

Default QR code

Frequently Asked Questions

How do I resize a QR code image using IronQR?

To resize a QR code image using IronQR, download the IronQR C# library, create a QrStyleOptions object, set the Dimensions property for your desired size, generate the QR code, and save it.

What is the Dimensions property in IronQR?

The Dimensions property in IronQR specifies the width and height of the QR code in pixels, providing a 1:1 mapping for accurate resizing.

Why is it important to resize QR codes properly?

Properly resizing QR codes ensures they remain scannable and clear across both print and digital formats, preventing blurring and maintaining readability.

Can I customize the size of a QR code for print using IronQR?

Yes, you can customize the size of a QR code for print by setting the Dimensions property in the QrStyleOptions class to your specific requirements.

What file format can I save the resized QR code as using IronQR?

You can save the resized QR code as a PNG file using IronQR.

Is it possible to create a QR code from a URL using IronQR?

Yes, IronQR allows you to generate a QR code from a URL with customizable dimensions using the QrStyleOptions class.

What steps are involved in resizing a QR code with IronQR?

To resize a QR code with IronQR, download the library, create a QrStyleOptions object, set the Dimensions property, generate the QR code, and save it.

How does the Dimensions property affect the final QR code output?

The Dimensions property directly affects the final QR code output, determining its exact pixel width and height.

Ahmad Sohail
Full Stack Developer

Ahmad is a full-stack developer with a strong foundation in C#, Python, and web technologies. He has a deep interest in building scalable software solutions and enjoys exploring how design and functionality meet in real-world applications.

Before joining the Iron Software team, Ahmad worked on automation projects ...

Read More
Ready to Get Started?
Nuget Downloads 55,860 | Version: 2025.12 just released