Skip to main content

Create Barcode

BarcodeCreate Barcode

The Create Barcode API generates a standalone barcode or QR code as an image. You send the text to encode, barcodeType (e.g. qrCode, code128, dataMatrix), hideText (whether to show the text alongside the barcode), and optionally IsAsync. The API returns a binary image (e.g. PNG) of the barcode. Use the tester below to try it; more details are in the sections that follow.

Try the Create Barcode API

Quick reference

Endpoint: POST /api/v2/CreateBarcode · Required: api-key, text, barcodeType, hideText, IsAsync

Try it live

Use the form below to send your API key, barcode content, type, and options. The response is the barcode image (binary or polling URL when async). No code required—fill the fields and click Send request.

Loading API Tester...

Overview, parameters, and use cases

What is Create Barcode?

This endpoint creates a barcode or QR code as a standalone image file. You provide the text to encode and the barcode type; the API returns a binary image (e.g. PNG) suitable for printing, embedding in documents, or use in apps. No PDF is required—ideal when you only need the barcode graphic.

Key features

  • 150+ barcode types – QR Code, Code128, DataMatrix, Aztec, HanXin, PDF417, Code39, EAN13/EAN8, UPC-A/UPC-E and more.
  • Simple inputtext and barcodeType; optional hideText to show or hide the human-readable text.
  • Binary image output – PNG by default; use IsAsync for larger or high-density codes to avoid timeouts.
Best for

Use when you need a barcode image for labels, tickets, or apps. To put the barcode onto a PDF, use Add Barcode to PDF instead.

Prerequisites

Before using this endpoint, make sure you have:

  • A valid PDF4me API key (Get your API Key)
  • The text content you want to encode in the barcode
  • The barcode type selection

Response Format

The API returns a binary image file (PNG format by default):

  • Status 200: Barcode creation completed immediately - binary image content in response body
  • Status 202: Request accepted and processing asynchronously - use the Location header URL to poll for results

For asynchronous requests, poll the Location URL until status 200 is returned with the barcode image.

Get Help