IRONSOFTWAREHOME
Resizing QR Code as Image
using IronQr;
using IronSoftware.Drawing;

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

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

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

// Save using the style options
AnyBitmap qrResized = qr.Save(styleOptions);
qrResized.SaveAs("qr-resized.png");
Imports IronQr
Imports IronSoftware.Drawing

Dim url As String = "https://ironsoftware.com/csharp/qr/"

' Generate the QR code data
Dim qr As QrCode = QrWriter.Write(url)

' Define custom resizing
Dim styleOptions As New QrStyleOptions With {
    .Dimensions = 100
}

' Save using the style options
Dim qrResized As AnyBitmap = qr.Save(styleOptions)
qrResized.SaveAs("qr-resized.png")
NuGet Download
PM > Install-Package IronQR
Resizing QR Code as Image

Resizing QR Code as Image

Resizing a QR code is a critical step in ensuring that your digital assets remain functional across various mediums, from high-resolution print marketing to small-scale mobile app interfaces. By adjusting the pixel dimensions, you can prevent pixelation and ensure the scanning hardware can accurately detect the data matrix at various distances. Using IronQR, developers can precisely control the output resolution, ensuring the generated QR code maintains its structural integrity and "quiet zone" regardless of the final display size.

5-step guide for resizing a QR code

  • using IronQr;
  • string url = "https://ironsoftware.com/csharp/qr/";
  • QrStyleOptions styleOptions = new QrStyleOptions { Dimensions = 500 };
  • AnyBitmap qrResized = qr.Save(styleOptions);
  • qr.Save(styleOptions).SaveAs("qr-resized.png");

Code Explanation

First, the IronQr namespace is imported to facilitate the generation and rendering process. The target URL is defined and processed by the QrWriter.Write method, which creates the internal data structure for the QR code.

Next, the QrStyleOptions class is used to control the physical output. By setting the Dimensions property, you specify the exact pixel width and height for the final image. Since QR codes are square, this value applies to both axes, ensuring a 1:1 aspect ratio. Finally, the Save method applies these style configurations to the QR data, and SaveAs exports the high-resolution bitmap to a local file.

Discover How to Resize QR Codes with IronQR

Ready to Get Started?

Nuget Downloads 76,271Version:2026.10just released

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 IronQR
Book your free Live Demo
Booking Badge

Trusted by Millions of Engineers Worldwide

Iron Software's customer logos
Get a Quote, No Obligation
Your details will always be kept confidential.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Trusted by Millions of Engineers Worldwide
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.10

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.10

  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