
β οΈ This blog post was created with the help of AI tools. Yes, I used a bit of magic from language models to organize my thoughts and automate the boring parts, but the geeky fun and the π€ in C# are 100% mine.
Hi!
I needed a quick way to generate QR codes in .NETβno heavy dependencies, no complex setup, just something that works and thatβs exactly why I built:
π ElBruno.QRCodeGenerator
An open-source, lightweight library to generate QR codes in multiple formats:
- π₯οΈ ASCII (perfect for CLI tools)
- πΌοΈ Images (PNG/SVG)
- π Payloads (WiFi, URL, email, vCard)
π¬ Watch the video
I recorded a quick demo showing how everything works end-to-end π
β‘ Getting started
The goal is simple: generate QR codes with minimal code.
Hereβs a basic example from the repo:
using ElBruno.QRCodeGenerator.CLI;
// Simplest possible usage
QRCode.Print("https://github.com/elbruno");
Thatβs it. You already have a QR code printed directly in your terminal π
Perfect for CLI tools or quick debugging scenarios.
π§ Working with Payloads
You can also generate real-world QR codes, not just plain text.
For example, WiFi credentials and more:
using ElBruno.QRCodeGenerator.Payloads;
// WiFi network QR code
var wifi = PayloadBuilder.Wifi("MyNetwork", "MyPassword123");
Console.WriteLine(wifi.GetPayloadString());
// Output: WIFI:T:WPA;S:MyNetwork;P:MyPassword123;;
// vCard contact
var vcard = PayloadBuilder.VCard("Bruno Capuano")
.WithPhone("+1234567890", VCardPhoneType.Mobile)
.WithEmail("bruno@example.com", VCardEmailType.Work)
.WithOrganization("Contoso");
Console.WriteLine(vcard.GetPayloadString());
// Combine with any renderer (e.g., CLI)
QRCode.Print(wifi.GetPayloadString());
Other supported payloads:
- πΆ WiFi
- π§ Email
- π URLs
- π€ vCard (contacts)
π‘ Final thoughts
This project started as a fun experiment (with a bit of Copilot help π) and ended up being a super handy tool for day-to-day dev work.
π Repo: https://github.com/elbruno/ElBruno.QRCodeGenerator
π Video: https://youtu.be/op1dYj8Af6U
If you try it, let me know what you build! π
Happy coding!
Greetings
El Bruno
More posts in my blog ElBruno.com.
More info in https://beacons.ai/elbruno

Leave a comment