
QR codes store a lot of data in a small space. They are easy to scan with smartphones or other devices to open a website, watch a video, or retrieve encoded information. In this post, we will show you how to generate text‑based QR codes programmatically in C#. Follow the step‑by‑step guide and code snippets to build your own text to QR code generator in C#.
This article covers the following topics:
- C# text to QR code generator API
- Convert text to QR code in C#
- Customize text to QR code generation
- Generate a QR code with text
- Text to QR code generator online
- Free learning resources
C# Text to QR Code Generator API
To convert any text to a QR code, we use the Aspose.BarCode for .NET API. It supports generating, scanning, and reading barcodes and QR codes in .NET applications. The API lets developers save the generated barcode or QR code in formats such as PNG, JPEG, and TIFF. It covers more than 60 barcode symbols, including QR code, Code 128, Code 39, EAN, UPC, and many others.
Please download the DLL of the API or install it using the following NuGet command:
PM> Install-Package Aspose.BarCode
Convert Text to QR Code in C#
Generate a QR code from any text by following these steps:
- Create an instance of the BarcodeGenerator class.
- Set EncodeTypes to QR.
- Provide the input text to encode.
- (Optional) Set QR code customization options.
- Call Save() to write the QR code image to a file.
The code sample below demonstrates how to convert text to a QR code in C#.

Text to QR Code in C#.
Customize Text to QR Code Generation in C#
You can change the appearance of QR codes generated from text by setting additional properties such as background color, border color, and image height.
The following sample shows how to customize text to QR code generation in C#.

Customize Text to QR Code Generation in C#.
Generate QR Code with Text in C#
Add human‑readable text to the QR code image as a main label, top caption, or bottom caption. Set the CodeTextParameters and CaptionBelow properties as shown:

Generate QR Code with Text in C#.
Text to QR Code Generator - Get a Free License
You can get a free temporary license to try the library without evaluation limitations.
Text to QR Code Online
Generate a QR code from any text input online for free using the QR code generator web app, which is built with this API.

Text to QR Code Generator - Learning Resources
Explore more about barcode generation and other library features with these resources:
Conclusion
In this post, we showed how to build a text to QR code generator in C#. We also covered customization options and adding captions. Using Aspose.BarCode for .NET, you can create high‑quality QR codes for website links, contact details, and more. For any questions, visit our free support forum.