📊

Bulk Barcode Generator

Generate up to 20 barcodes in a single API request

POST 1 credit /v1/barcode/bulk
curl -X POST "https://barcode.toolkitapi.io/v1/barcode/bulk" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {"data": "ABC-001", "barcode_type": "code128"},
      {"data": "ABC-002", "barcode_type": "code128"},
      {"data": "4006381333931", "barcode_type": "ean13"}
    ],
    "format": "png"
  }'
import httpx

resp = httpx.post(
    "https://barcode.toolkitapi.io/v1/barcode/bulk",
    json={
    "items": [
      {"data": "ABC-001", "barcode_type": "code128"},
      {"data": "ABC-002", "barcode_type": "code128"},
      {"data": "4006381333931", "barcode_type": "ean13"}
    ],
    "format": "png"
  },
)
print(resp.json())
const resp = await fetch("https://barcode.toolkitapi.io/v1/barcode/bulk", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "items": [
      {"data": "ABC-001", "barcode_type": "code128"},
      {"data": "ABC-002", "barcode_type": "code128"},
      {"data": "4006381333931", "barcode_type": "ean13"}
    ],
    "format": "png"
  }),
});
const data = await resp.json();
console.log(data);
# See curl example
Response 200 OK
{
  "total": 3,
  "format": "png",
  "results": [
    {"data": "ABC-001", "image": "iVBORw0KGgo...base64...", "barcode_type": "code128"},
    {"data": "ABC-002", "image": "iVBORw0KGgo...base64...", "barcode_type": "code128"},
    {"data": "4006381333931", "image": "iVBORw0KGgo...base64...", "barcode_type": "ean13"}
  ]
}

Try It Live

Live Demo

Description

Generate up to 20 barcodes in a single API request

How to Use

1

1. Build an `items` array where each object contains at least a `data` field. Optionally set `barcode_type`, `include_text`, `fg_color`, and `bg_color` per item.

2

2. Send a POST request with the items array. The `format` field at the top level is fixed to `png` for bulk generation.

3

3. The response returns a `results` array in the same order as your input, each containing the `data`, `image` (base64 PNG), and `barcode_type`.

4

4. Iterate through the results to save or embed each barcode image. The `total` field confirms how many were generated.

About This Tool

Use the Bulk Barcode Generator to create up to 20 barcodes in a single API call. Instead of making separate requests for each barcode, batch them together to reduce latency and simplify your integration.

Each item in the batch can use a different symbology, data value, colour scheme, and text settings. The API processes all items and returns base64-encoded PNG images for each one. If any single item fails (e.g. invalid data for the chosen symbology), the entire request returns an error identifying the offending item.

This endpoint is ideal for label printing workflows, batch inventory setup, or any scenario where you need multiple barcodes generated at once.

Why Use This Tool

Frequently Asked Questions

What is the maximum batch size?
You can generate up to 20 barcodes per request. For larger volumes, split your data into batches of 20 and make multiple calls.
Can I mix different barcode types in one batch?
Yes. Each item in the `items` array can specify a different `barcode_type`. You could generate Code 128, EAN-13, and UPC-A barcodes all in the same request.
What happens if one barcode in the batch fails?
The entire request returns a 400 error identifying which item failed and why. Fix the offending item and resubmit the full batch.
Is SVG output supported for bulk generation?
No — bulk generation currently supports PNG output only. For SVG barcodes, use the single `/v1/barcode/generate` endpoint.

Start using Bulk Barcode Generator now

Get your free API key and make your first request in under a minute.