A Barcode generator is now of the essential tools for online and offline shops. Furthermore, being able to automate the barcode, ISBN barcode, 1D and 2D code generation is important for both manufacturers and retailers.

Barcode Generator API Benefits

Supported Formats – Barcode Formats

Our tool supports numerous code formats that you can print and scan. They include Code128, Code39, Postnet, UPCA, EAN8, ISBN, Codabar, I2of5, Code93, EAN13, JAN13, Bookland, UPCE, PDF417, PDF417 Truncated, DataMatrix, QRCode, Aztec, Planet, among tens of others.

Securely Create QR Code

Our online barcode API is hosted and runs from Amazon’s AWS computing platform, giving you not only fast speeds but also security. AWS computing infrastructure incorporates end-to-end SSL/TLS encryption, making it unusable if accessed by unauthorized third parties.

Access to Integrations

You can use BarCode Generator within the PDF.co platform via integration on automation platforms like Zapier and IntegromatUiPath, and BluePrism. You can quickly connect with the most common apps via our 300+ API integrations.


Barcode Generator Integrations

You can automate barcode generation even if you’re a non-developer using 300+ business automation platforms like:

How to Upload File and Use Barcode Generator API

To demonstrate the /v1/barcode/generate/ endpoint, we will generate a Code39 barcode with a value acegik13579. Here’s what the Code39 barcode looks like.

Code39 Barcode Generator

Code39 Barcode Output



URL: https://api.pdf.co/v1/barcode/generate
Method: POST
Parameter Description
Name optional. File name for generated output. Must be a string.
Value Output value of the generated barcode.
Types optional. Sets the generated barcode type. Available values are available. Code39 is the default.
Inline optional. Set to false to generate data URL.



profiles optional. It should be a string.Set additional and extra options using these parameters..

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/barcode/generate' \
--header 'Content-Type: application/json' \
--header 'x-api-key: your-api-key' \
--data-raw '{
"name": "barcode.png",
"value": "acegik13579",
"type": "code39",
"inline": false

This sample code and other cURL code samples are found in this link.

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

Barcode Generator API Demo
Barcode Generator API Demo


You can see the Barcode Generator API JavaScript source code samples in this link.

You can see the Barcode Generator API PHP source code samples in this link.

You can see the Barcode Generator API Python source code samples in this link.

You can see the Barcode Generator API Java source code samples in this link.

You can see the Barcode Generator API C# source code samples in this link.


Run Barcode Generator API in the Background

You can run our barcode generator in Sync mode for less than 25 seconds, or in Async mode for over 25 seconds. We recommend that you generate your bar codes in Async mode if you plan to generate over 100 pages of barcodes.

Otherwise, the API job may timeout after 25 seconds and return an error, when generating QR codes, UPC barcodes, ISBN barcodes, among others. To enable Async mode, set the “async” input parameter to “true”.

Frequently Asked Questions – Online Barcode Generator API

How A Barcode Is Generated?

A barcode generator works by encoding (converting) characters into a series of symbols that you can scan a machine, easily. The symbols can be a series of lines and spaces, of varying widths, which are 1D.

The encoding happens in pairs, where the first character is converted into a black bar of varying width, while the second character is converted into a white space of varying width, between two bars.

When you use our online barcode generator API to create a Barcode, our Barcode Generator converts your product’s information into the 1D symbol, which you can then print out, and attach to your products.

How Much Does It Cost To Create A Barcode?

The pricing depends on the number of barcodes you need to generate, whether it is a single or bulk generation. You can get more details on the pricing page here.

Can I Generate my Own Barcode?

Yes, you can use our Online Barcode Generator API to generate your barcodes remotely. To do that, you will need to have the product information you want to convert to a barcode, and some credits to enable our API.

How Do I Get A Barcode For My Small Business?

You can use our Online Barcode Generator API to get a barcode for your business. Our API allows small businesses to automate barcode generation, which frees you to do other less menial tasks. We have code examples that you can follow.

Furthermore, you can contact us in case you need help in implementing our Online Barcode Generator API. Our barcode generator also allows you to scale up or down, depending on how many barcodes you need to generate.

How to Use Our Barcode Generator API

You can access our Barcode Generator using an API key, which you get after you register with us. However, you must activate the API by buying credits from our billing page.

You can check here for more code samples. Moreover, if you have any questions regarding the use of our API, you can contact us anytime via our Chat function.