QR Code Generator API
UtilitiesMAINTAINED1 token / call

QR Code Generator API

QR codes for any text or URL as PNG, SVG or base64, with size, margin, error correction and colours

Turn any text or URL into a scannable QR code as PNG, SVG or a base64 data URL, with control over size, margin, error-correction level and colours. Generated in the worker on every call, nothing stored.

Every call needs an X-Api-Key header. A free key includes 500 tokens a month, no card required. 1 token per call, so the free plan covers about 500 calls a month.

No credit card requiredAccess to 125+ APIsCancel anytime
response
API response example
Production Ready
Battle-tested infrastructure with a 99.9% uptime SLA. Rate limits are generous, responses are consistent.
Simple Integration
Standard REST + JSON. Works with any HTTP client. Copy-ready code snippets in 4 languages.
One Key, 125+ APIs
Your DataAndAPIs subscription unlocks every API on the platform — anime, finance, sports, and more.

Use cases for QR Code Generator API

  • Put a QR code on tickets, receipts, posters and packaging that links to a page or payment.

  • Generate Wi-Fi, contact card or app-link codes for onboarding screens.

  • Embed codes in emails and PDFs as base64 images.

  • Brand codes with your colours while keeping them scannable.

QR Code Generator API endpoints

Every endpoint with its parameters and a real example response.

GETGenerate QR Code

https://api-qrcode.dataandapis.com/v1/qrcode

Query parameters

ParameterExample
dark#000000Optional
datahttps://dataandapis.comRequired
eccHOptional
formatpngOptional
light#ffffffOptional
margin4Optional
size400Optional

Example request

curl "https://api-qrcode.dataandapis.com/v1/qrcode?dark=%23000000&data=https%3A%2F%2Fdataandapis.com&ecc=H&format=png&light=%23ffffff&margin=4&size=400" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
https://dataandapis.com/images/qr-code-example.webp

GETGenerate QR Code (Base64)

https://api-qrcode.dataandapis.com/v1/qrcode/base64

Query parameters

ParameterExample
datahttps://dataandapis.comRequired
eccMOptional
size300Optional

Example request

curl "https://api-qrcode.dataandapis.com/v1/qrcode/base64?data=https%3A%2F%2Fdataandapis.com&ecc=M&size=300" \
  -H "X-Api-Key: YOUR_API_KEY"
Example response
{
  "format": "png",
  "width": 300,
  "error_correction_level": "M",
  "data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AAAAAklEQVR4..."
}

Where the data comes from

Source
Generated in the worker with a standard QR encoder. Pure computation.
Freshness
Generated on every call.

One install. Every endpoint.

No proprietary SDKs needed. Any HTTP client works. Pick your language and paste.

3languages
2endpoints
RESTarchitecture
1key for all APIs
  • Fully typed responses — auto-completion in your IDE
  • Tracks the API in lockstep — new endpoints land same day
  • One key works across 125+ APIs on the platform
import axios from 'axios';

const { data } = await axios.get(
  'https://api-qrcode.dataandapis.com/v1/qrcode',
  { headers: { 'X-Api-Key': process.env.API_KEY } }
);

QR Code Generator API · X-Api-Key

Explore the endpoints

Browse request parameters and inspect live example responses.

Available Endpoints

Request Parameters

API URL

Headers

X-Api-Key

Query Parameters

dark(Optional)
data(Required)
ecc(Optional)
format(Optional)
light(Optional)
margin(Optional)
size(Optional)
import axios from 'axios';

const url = 'https://api-qrcode.dataandapis.com/v1/qrcode';
const { data } = await axios.get(url, {
  headers: { 'X-Api-Key': 'YOUR_API_KEY' }
});

One subscription. Every API.

Tokens unlock this API and 125+ others on DataAndAPIs. Switch APIs any time — we promote.

FREE

$0/mo

500 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Community support
Start free
Most Popular

STARTER

$6.99/mo

25,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Email support
Subscribe

PRO

$24.99/mo

100,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority email support
Subscribe

ULTRA

$99.99/mo

1,000,000 tokens / month

  • Access to all APIs
  • Tokens reset monthly
  • Priority support
Subscribe

Need higher volume, dedicated infra, or a custom contract? Talk to sales →

Questions about QR Code Generator API

Ship QR Code Generator API this afternoon.

500 free tokens. No card. Plus 125+ other APIs on the same key.