Generate QR codes & barcodes with a single API call
Simple REST API for developers. 30+ barcode formats. Multiple output formats. No authentication required. Just send a request and get your code.
-H "Content-Type: application/json" \
-d '{"data": "https://example.com", "format": "png"}'
API Endpoints
Two endpoints. Infinite possibilities.
/api/qrcode
Generate QR codes from any text, URL, or data string.
Parameters
data
The content to encode in the QR code
size
Size in pixels (50-1000, default: 300)
format
Output format: svg, png, webp, pdf, eps (default: svg)
/api/barcode
Generate barcodes in 31 different formats.
Parameters
type
Barcode format (e.g., CODE_128, EAN_13)
data
The content to encode in the barcode
format
Output format: svg, png, jpg, html, dynamic-html (default: svg)
Response Format
All endpoints return JSON with base64 encoded data for all formats:
QR Code Formats
Barcode Formats
"data": "PHN2ZyB4bWxucz0i...",
"format": "svg"
}
Code Examples
Copy, paste, generate. It's that simple.
curl -X POST https://qr-bar.codes/api/qrcode \
-H 'Content-Type: application/json' \
-d '{"data": "https://example.com", "format": "png"}'
const response = await fetch('https://qr-bar.codes/api/qrcode', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ data: 'https://example.com', format: 'png' })
});
const { data } = await response.json();
// data is base64 encoded
curl -X POST https://qr-bar.codes/api/barcode \
-H 'Content-Type: application/json' \
-d '{"type": "CODE_128", "data": "ABC-12345"}'
$response = Http::post('https://qr-bar.codes/api/barcode', [
'type' => 'EAN_13',
'data' => '5901234123457',
'format' => 'svg'
]);
$svg = base64_decode($response->json('data'));
Supported Barcode Types
31 formats covering retail, logistics, healthcare, and more.
CODE_128
Universal
CODE_128_A
Uppercase + control
CODE_128_B
Full ASCII
CODE_128_C
Numeric pairs
CODE_39
Alphanumeric
CODE_39_CHECKSUM
With checksum
CODE_93
Compact
EAN_13
Retail (EU)
EAN_8
Small products
EAN_2
2-digit addon
EAN_5
5-digit addon
UPC_A
Retail (US)
UPC_E
Small packages
ITF_14
Shipping
INTERLEAVED_2_5
Warehouse
STANDARD_2_5
Industrial
CODABAR
Libraries
CODE_11
Telecom
CODE_32
Pharma (IT)
MSI
Inventory
MSI_CHECKSUM
With checksum
POSTNET
USPS mail
PLANET
USPS tracking
RMS4CC
Royal Mail
KIX
PostNL
PHARMA_CODE
Pharmaceutical
Rate Limiting
The API allows 1000 requests per hour per IP address. Rate limit headers are included in every response.