← Back to home
Visual

Barcode Generator

QR codes and barcodes at the edge

Generate QR codes and 1D barcodes as clean SVG — no fonts, no raster images. Supports QR (all error correction levels), Code 128, EAN-13, UPC-A, and Code 39. Sub-5ms at the network edge.

Base URL https://qr-codes-barcodes.p.rapidapi.com
Auth X-RapidAPI-Key: YOUR_KEY
Format application/json
Subscribe on RapidAPI

Supported Formats

Format Endpoint Output Notes
QR Code /v1/qr SVG EC levels L, M, Q, H — auto-selects version
Code 128 /v1/barcode SVG Full printable ASCII (Subset B)
EAN-13 /v1/barcode SVG 12 or 13 digits — check digit auto-computed
UPC-A /v1/barcode SVG 11 or 12 digits — encoded as EAN-13 with leading 0
Code 39 /v1/barcode SVG Alphanumeric + symbols (auto-uppercased)

Endpoints

POST /v1/qr

Generate a QR code SVG (error correction L / M / Q / H)

Request body
{
  "data": "https://example.com",
  "size": 256,
  "error_correction": "M"
}
Response 200
{
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" .../>",
  "version": 3,
  "error_correction": "M",
  "modules": 29
}
cURL example
curl -X POST https://qr-codes-barcodes.p.rapidapi.com/v1/qr \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: qr-codes-barcodes.p.rapidapi.com" \
  -d '{"data":"https://example.com","size":256,"error_correction":"M"}'

# Save SVG directly to a file:
curl -s -X POST https://qr-codes-barcodes.p.rapidapi.com/v1/qr \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: qr-codes-barcodes.p.rapidapi.com" \
  -d '{"data":"https://example.com","size":256}' \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['svg'])" > qr.svg
POST /v1/barcode

Generate a 1D barcode SVG (EAN-13, UPC-A, Code 128, Code 39)

Request body
{
  "data": "5901234123457",
  "symbology": "ean13",
  "height": 100,
  "bar_width": 2
}
Response 200
{
  "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" .../>",
  "symbology": "ean13",
  "data": "5901234123457"
}
cURL example
curl -X POST https://qr-codes-barcodes.p.rapidapi.com/v1/barcode \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: qr-codes-barcodes.p.rapidapi.com" \
  -d '{"data":"5901234123457","symbology":"ean13"}'

# Save SVG directly to a file:
curl -s -X POST https://qr-codes-barcodes.p.rapidapi.com/v1/barcode \
  -H "Content-Type: application/json" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: qr-codes-barcodes.p.rapidapi.com" \
  -d '{"data":"5901234123457","symbology":"ean13"}' \
  | python3 -c "import sys,json; print(json.load(sys.stdin)['svg'])" > barcode.svg
GET /v1/health No auth required

Health check — no authentication required

Response 200
{
  "status": "ok"
}
cURL example
curl https://qr-codes-barcodes.p.rapidapi.com/v1/health

Error Responses

All errors follow a flat JSON shape:

Error shape
{ "error": "<message>", "code": <http_status> }
Status Condition
401Missing or invalid X-RapidAPI-Proxy-Secret header
400Unsupported symbology, invalid data (e.g. non-numeric EAN-13), or bad EC level
422Malformed JSON request body
404Unknown route
500Internal server error

Generate your first code

Sign up on RapidAPI to get your API key and start generating barcodes in minutes.

Subscribe on RapidAPI →