The Barcode Generator API can generate high-quality barcode images. It supports almost all 1D linear and 2D multidimensional barcodes such as QR Code, Datamatrix, MaxiCode, MicroQR Code, Code 39, Code 128, PDF417, and many more.

It also supports logo or image insertion at the center of the QR Code. The generated barcode can be a downloadable barcode image or a Datauri URL to easily embed in web pages or documents.

All the files generated through our API are automatically deleted after an hour. This is one of the security features that we use to protect your files. To learn more, please read our Security page here https://pdf.co/security

Barcode Generator API Benefits

Supports All Popular Barcodes

The Barcode Generator API can generate all types of popular barcodes such as QR Code, Code 39, Code 128, EAN, Codabar, and a lot more.

Personalize QR Codes

The QR Code can be personalized by adding a decorative image. You can add a logo or an image right at the center of the barcode.

Datauri URL Support

The generated barcodes can be in a form of downloadable images or a Datauri URL. The Datauri is very useful when you need to add the barcode to a document or web page without the need to upload the barcode in cloud storage.

On-Premise API Server

The PDF.co APIs can be used in an on-demand and in an on-premise API Server. The on-demand is readily available to everyone who signs up on the PDF.co website, while the on-premise API Server is available via request. To get a free trial, please contact our support team.

Sign Up

Barcode Generator API Integrations

PDF.co has over 300+ app integration. Kindly explore our following plugins:

Barcode Generator API Samples & Demo

In this demonstration, we will generate a QR code with the ByteScout logo in the center using the /v1/barcode/generate endpoint. Below is the image of what the output will look like.

Barcode Generator API Generated QR Code
Screenshot of Generated QR Code

Let’s go over the /v1/barcode/generate endpoint’s parameters and their corresponding functions real quick.

Endpoint

URL: https://api.pdf.co/v1/barcode/generate
Method: POST
Parameter Description
types optional. Sets barcode type to generate. QRCode is default.
inline optional. Set to true to generate datauri url instead of file.
decorativeImage optional. works for QR Code only.
profiles optional. Must be a String. Set custom configuration. See profiles examples here

 

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--data-raw '{
    "name": "barcode.png",
    "value": "abcdef123456",
    "type": "QRCode",
    "inline": false,
    "decorationImage": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png"
}'

The Barcode Generator API cURL sample codes are available here.

Let’s see the Barcode Generator API in action using our cURL code snippet.

Barcode Generator API QR Code Output
Barcode Generator API in Action

The Barcode Generator API JavaScript sample codes are available here.

The Barcode Generator API PHP sample codes are available here.

The Barcode Generator API Java sample codes are available here.

The Barcode Generator API C# sample codes are available here.

Sign Up

Related Samples: