Generate barcode SVGs with a simple API

Generate barcode SVGs from a simple endpoint for internal tools and prototypes.

Generate barcode SVGs

SVG

Send a supported barcode format and value, then receive SVG barcode artwork.

GET /api/barcode/api/barcode?format=code128&text=QRCODEQ-123
Open example SVG

Parameters

Query
format
Barcode type, default code128. An unknown format returns a 400 error with the list of supported formats.
text
The barcode value, up to 512 characters (413 above that). Defaults to the format's sample value when missing, and is validated against the format before SVG is returned (400 on failure). EAN-13, UPC-A, EAN-8, ITF-14 and ISBN accept the body without the final digit and get the check digit added automatically. ISSN uses the dashed form, like 0317-8471, and its check digit can be X.
supported formats
code128, ean13, upca, code39, ean8, upce, itf14, gs1-128, isbn, issn, datamatrix, pdf417, azteccode, codabar, msi, pharmacode, gs1datamatrix
rate limit
120 requests per minute per IP. Responses are cacheable for one hour, so cache repeated outputs on your side.
Cache repeated outputs and do not use these endpoints as a store for sensitive data.

When to use the Barcode API

The barcode API is meant for internal previews, docs and small automation tasks. It is deliberately simple: send a format and value, get SVG artwork back, then validate the result inside your own workflow before printing at scale.

Validate before calling the API

Barcode API calls should not be the first place a bad value is caught.

  • Check length, format and check digit inside your app.
  • Store the generated format beside the business record.
  • Run sample labels through the scanner your users rely on.

When the input is clean, barcode automation becomes much easier to trust.

Generate barcode SVG from the API

  1. Choose the barcode format required by your workflow.
  2. Send the value through the API request and check the SVG response.
  3. Validate the barcode value before using the output in labels or documents.
  4. Cache repeated requests when the same values are used often.
  5. Scan a printed sample before relying on generated barcode artwork operationally.

Where the Barcode API fits

  • Internal tools
  • Label previews
  • Prototype dashboards

Barcode API checks

  • The barcode API is useful for internal tools, label previews, test documents and prototype dashboards.
  • Do not use it as a substitute for official UPC, EAN, ISBN, GTIN or GS1 number assignment.
  • Keep API inputs clean and validate them before generating production labels.

Barcode API mistakes to avoid

  • Sending unvalidated retail or product numbers straight to label artwork.
  • Using the API as if it issued UPC, EAN, ISBN, GTIN or GS1 identifiers.
  • Skipping print and scanner checks when API output is placed into automated documents.

Barcode API questions

What formats can the Barcode API generate?

It supports the barcode formats wired into the site, including common 1D and 2D formats used by the generators.

Can I use this for production labels?

Use it only after validating the value, format, scanner support and print output. It creates artwork, not official product data.

Does the API store barcode values?

The first version is intended as a simple generator endpoint. Still, avoid sending private data through URL query strings.

What happens when the value is invalid?

The endpoint returns an error instead of artwork. Validate values before calling the API when the barcode is part of an automated workflow.

Can the API issue UPC or EAN numbers?

No. The API creates barcode artwork from values you provide. To get official UPC or EAN numbers for retail, register with GS1 for a company prefix.

Which barcode formats does the API support?

It supports the same formats available in the site's generators, including Code 128, Code 39, EAN-13, UPC-A, ITF-14, Data Matrix, PDF417 and others. Check the API documentation for the full list of supported symbologies.

Does the API validate the barcode value before generating artwork?

It performs basic format checks and returns an error for clearly invalid values. But you should still validate numbers against your own records before using the output, especially for retail barcodes.

Can I use the Barcode API in a production label printing pipeline?

You can, but validate every value first, cache repeated requests and always scan a printed sample before running a batch. The API generates artwork, so print quality and scanner testing are still your responsibility.