QR Maker API Docs
Back to Generator

Developer API Reference

Generate customized, production-ready QR codes dynamically using simple HTTP GET requests. Hosted directly on Cloudflare edge nodes for speedy response times.

All API requests are optimized for edge caching, returning full Cache-Control: public, max-age=31536000, immutable headers. This guarantees instant load speeds when embedded directly in HTML tags or Markdown files.


Base Endpoint

GET https://qrmaker.ryanmarch.me/api/qr

Test in Postman or Bruno

Download our API request collection to test, preview, and run requests instantly. Supported by both Postman and Bruno.


Query Parameters

Customize your generated QR codes by appending the following parameters to the URL query string.

Parameter Type Required Default Description
content String Yes The URL or text content to encode. Must be properly URL-encoded.
format String No png Output format: png (raw binary file), svg (vector graphic), or base64 (JSON wrapping Data URI).
size Number No 1024 Width and height in pixels (for png and base64). Min: 64, Max: 4096.
fgColor String No 000000 Hex color code for the foreground/pixels. Do not include a leading #.
bgColor String No ffffff Hex color code for background. Ignored if transparent=true. Do not include #.
transparent Boolean No false Set to true or 1 for a transparent background.
margin Number No 2 Quiet-zone border size in modules. Min: 0, Max: 10.
ecl String No M Error Correction Level: L (Low), M (Medium), Q (Quartile), H (High).
cornerRadius Number No 0 Quiet-zone background card border radius percentage. Min: 0, Max: 100.
cornerStyle String No square Rendering style of modules: square, rounded, circle, leaf, beveled.
icon String No none Overlay an icon: link, globe, text, wifi, contact, email, phone, map-pin, sms, event, github, linkedin, instagram, facebook, whatsapp.
iconSize Number No 20 Percentage width of center icon. Min: 10, Max: 30.
iconColor String No Hex color code for the center icon. Defaults to fgColor. Do not include #.
iconBg String No rounded Shape of the backing card behind the icon: rounded, circle, square, or none.

Response Formats

PNG Image (Default)

Returns raw image binary data directly. Ideal for embedding in static markups.

Content-Type: image/png

SVG XML

Returns standard, lightweight XML vector code.

Content-Type: image/svg+xml; charset=utf-8

Base64 Data JSON

Returns a clean JSON object containing a Base64-encoded Data URI string.

{
  "data": "data:image/png;base64,iVBORw0KGgo..."
}

Interactive Playground

Construct your API request parameters below and preview the generated QR code instantly.


Code Integration

Easy-to-use snippets to programmatically fetch, generate, or embed QR codes in your application workflows.

<!-- Embed custom PNG directly in your page -->
<img src="https://qrmaker.ryanmarch.me/api/qr?content=https%3A%2F%2Fqrmaker.ryanmarch.me&size=512&fgColor=327DFF" alt="QR Code" />
# Download a high-res custom SVG QR code 
curl -o qr.svg "https://qrmaker.ryanmarch.me/api/qr?content=https%3A%2F%2Fqrmaker.ryanmarch.me&format=svg&fgColor=327DFF"
// Fetch Base64 data from the API
fetch("https://qrmaker.ryanmarch.me/api/qr?content=https%3A%2F%2Fqrmaker.ryanmarch.me&format=base64")
  .then(res => res.json())
  .then(json => {
    console.log("Base64 Data URI:", json.data);
    // document.getElementById('my-img').src = json.data;
  });