Barcode Generator API

Generate professional barcodes with our REST API. Support for 15+ barcode formats including Code128, QR Code, EAN, UPC, and more.

REST API
15+ Formats
High Quality
PNG & SVG

Barcode Tester

High-density linear barcode for alphanumeric data

API URL

https://printivo.cloud/api/v1/barcode/code128/ABC123?width=300&height=100&showText=true&quietZone=true

Preview

Barcode

API Documentation

Use our REST API to generate barcodes programmatically

Quick Start

Generate a barcode by making a GET request to our API endpoint:

GET https://printivo.cloud/api/v1/barcode/:type/:data

URL Parameters

Parameter Type Description Example
type string Barcode format (code128, qrcode, ean13, etc.) code128
data string Data to encode in the barcode ABC123

Query Parameters

Parameter Type Default Description
width integer 300 Barcode width in pixels (100-1000)
height integer 100 Barcode height in pixels (50-500)
format string png Output format: png or svg
showText boolean true Display text below barcode
quietZone boolean true Include quiet zones around barcode

Code Examples

# Generate a Code 128 barcode
curl "https://printivo.cloud/api/v1/barcode/code128/ABC123?width=400&height=150&format=png" \
  -o barcode.png

# Generate a QR Code with custom options
curl "https://printivo.cloud/api/v1/barcode/qrcode/https://printivo.cloud?width=300&height=300" \
  -o qrcode.png

Supported Barcode Formats

Code 128

High-density linear barcode for alphanumeric data

code128

Code 39

Variable length alphanumeric barcode

code39

EAN-13

European Article Number, 13 digits

ean13

EAN-8

Compact 8-digit EAN format

ean8

UPC-A

Universal Product Code, 12 digits

upca

UPC-E

Compact 6-digit UPC format

upce

QR Code

2D matrix barcode for URLs, text, and data

qrcode

Data Matrix

Compact 2D barcode for small items

datamatrix

PDF417

Stacked linear barcode for large data

pdf417

Aztec Code

2D matrix barcode for transport tickets

aztec

ITF

Interleaved 2 of 5 for numeric data

itf

Codabar

Linear barcode for libraries and blood banks

codabar

Response Format

The API returns the barcode image in the requested format (PNG or SVG). The image is returned with the appropriate Content-Type header.

Content-Type: image/png

Error Handling

If an error occurs, the API returns an HTTP error code with a JSON response:

{
  "error": "Invalid barcode data",
  "message": "The data provided is not valid for the selected barcode format",
  "statusCode": 400
}

Common Error Codes

Code Description
400 Bad Request - Invalid parameters or barcode data
404 Not Found - Invalid barcode type
429 Too Many Requests - Rate limit exceeded
500 Internal Server Error - Server-side issue
An unhandled error has occurred. Reload X