IRONSOFTWAREHOME

How to Resize a QR Code Image

Ahmad Sohail
Ahmad Sohail
Updated: December 22, 2025

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 note: The Dimensions property provides a direct 1:1 mapping; the integer you define becomes the exact pixel width and height of the final output.
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");

Original

Large QR code

Resized

Default QR code

Frequently Asked Questions

What is the recommended library for resizing QR code images in C#?

The recommended library for resizing QR codes in C# is the IronQR library, which provides functionalities such as setting the Dimensions property for custom sizes.

How can I resize a QR code using IronQR?

To resize a QR code using IronQR, first create a QrStyleOptions object, set the Dimensions property to the desired size, generate the QR code, and save it with the applied style options.

What property is used to set the size of a QR code in IronQR?

The Dimensions property is used to set the size of a QR code in IronQR, allowing you to specify its width and height in pixels.

Can I use IronQR to resize QR codes for both print and digital formats?

Yes, IronQR can resize QR codes for both print and digital formats by adjusting the Dimensions property to ensure scannability and clear readability.

What is the default format for saving a QR code using IronQR?

Using IronQR, the default format for saving a QR code is PNG, although you can choose other formats supported by the AnyBitmap class.

How does the Dimensions property affect the output of a QR code?

The Dimensions property provides a direct 1:1 mapping where the defined integer becomes the exact pixel width and height of the final QR code output.

Is it necessary to download the IronQR library separately?

Yes, you need to download the IronQR C# library from NuGet or any other package repository to use its QR code resizing features.

Can IronQR handle resizing to specific dimensions accurately?

Yes, IronQR can resize QR codes to specific dimensions accurately by using the Dimensions property for precise pixel size adjustments.

What are the steps involved in generating a QR code with custom dimensions?

The steps to generate a QR code with custom dimensions include downloading IronQR, creating a QrStyleOptions object, setting the Dimensions, generating the QR code, and saving it.

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.

...
Read More

Ready to Get Started?

Nuget Downloads 74,386Version:2026.9just released

Get your free 30-day Trial Key instantly.
No credit card or account creation required
C# NuGet Library for PDF
Install with NuGet

Version: 2026.9

PM > Install-Package IronQR
nuget.org/packages/IronQR/
  1. In Solution Explorer, right-click References, Manage NuGet Packages
  2. Select Browse and search "IronQR"
  3. Select the package and install
C# PDF DLL
Download DLL

Version: 2026.9

  1. Download and unzip IronQR to a location such as ~/Libs within your Solution directory
  2. In Visual Studio Solution Explorer, right click References. Select Browse, "IronQR.dll"

Licenses from $999

Key in blue circle

Get your free 30-day Trial Key instantly.

Your trial license will be sent to your email address

No limitations. 100% unlocked. No credit card.

bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get Your No-Obligation Consult
Complete the form below or email sales@ironsoftware.com
Your details will always be kept confidential.
Trusted by Millions of Engineers Worldwide
Iron Software's customer logos
Get your free 30-day Trial Key instantly.
No credit card or account creation required