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
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 54,926 | Version: 2025.12 just released