I built a QR Code API and here's what I learned
dev.to·1d·
Discuss: DEV
🌐IndieWeb
Preview
Report Post

Last month I needed to generate QR codes server-side for a client project. I tried a few existing APIs and... wasn’t thrilled. One charged $49/mo for basic features. Another had a 100-request limit before demanding a credit card. Most had SDKs that felt like they were written in 2012.

So I built my own. And then productized it.

The API

Dead simple. One endpoint:

curl "https://api.qrcodeapi.io/generate?data=https://dev.to&size=300"Returns a QR code. That’s it.

Options:

  • format - png, svg, or base64
  • size - 100-1000px
  • color - hex color for the QR code
  • bgColor - hex color for background
  • errorCorrection - L, M, Q, or H

Purple QR code on transparent background

curl ...

Similar Posts

Loading similar posts...