Close Icon
Get the Orca scan app QR code

Scan the QR code to download the mobile app

Free Barcode Image API

What is a Barcode Image API?

A Barcode Image API, takes a raw barcode value and converts it into a barcode image that can printed, added to labels, and scanned using a barcode scanner. The free barcode image API makes it easy to add the ability to generate barcodes to your applications using a single URL.

What can I do with the Barcode Image API?

You can encode pretty much any data into a barcode, so there are many potential applications. Here are a few examples:

How do I generate a QR code?

You can use the following steps to create a QR code:

  1. Visit barcode.orcascan.com/?data=Hello World
  2. Replace Hello World with the value you wish to encode
  3. Press enter to load the image
  4. Right click and save the image

How do I generate a Data Matrix barcode?

You can use the following steps to create a Data Matrix barcode:

  1. Visit barcode.orcascan.com/?type=datamatrix&data=Hello
  2. Replace Hello in the URL with the value you wish to encode
  3. Press enter to load the image
  4. Right click and save the image

How do I generate a Code 128 barcode?

You can use the following steps to create a Code 128 barcode:

  1. Visit barcode.orcascan.com/?type=code128&data=Hello World
  2. Replace Hello World in the URL with the value you wish to encode
  3. Press enter to load the image
  4. Right click and save the image

What types of barcodes can I generate?

You can generate the following barcode by setting the type query string parameter of the Barcode Image URL. If no type is specified qr is assumed:

Type Description
qr QR code
datamatrix Data Matrix
upca Universal Product Code-A
code39 Code 39
upce Universal Product Code-E
ean8 European Article Number 8
ean13 European Article Number 13
code93 Code 93
code128 Code 128
itf Interleaved 2 of 5 (ITF)
pdf417 Portable Data File 417
aztec Aztec Code

Note: some barcodes require a specific data structure. If you provide invalid data, the image returned will explain the issue, for example barcode.orcascan.com/?type=upca&data=hello

Error messages are shown in the barcode image - HTTP status code reflect type of error
Error messages are shown in the barcode image - HTTP status code reflect type of error

What images formats does the API support?

The Barcode Image API supports the following image formats:

Format Description
svg SVG (Scalable Vector Graphics) ← default
png PNG (Portable Network Graphics)
jpg JPG (Joint Photographic Experts Group)
tiff TIFF (Tagged Image File Format)
pdf PDF (Portable Document Format)
gif GIT (Graphics Interchange Format)
webp WebP (Web Picture Format)

You can change the format by appending format=png to your URL, for example https://barcode.orcascan.com/?data=Hello World&format=png

Is it possible to add text to the Barcode Image?

Yes, add the text=Hello World query string parameter with the value you would like to be appear below the barcode. For example barcode.orcascan.com/?data=Hello World&text=Hello World produces:

Add text to your barcode image
Add text to your barcode image

Is it possible to change the font size?

Yes, you can change the font size using the fontsize=100 query string parameter with a value in pixels, for example barcode.orcascan.com/?data=Hello&text=World&fontsize=100 produces:

Change the size of the text on your barcode image
Change the size of the text on your barcode image

If no font size is provided fontsize=fit is assumed, which automatically selects a font size that ensures the text does not breach the width of the barcode image.

How do I adjust the barcode whitespace?

You can adjust the amount of whitespace around the barcode using the padding=6 query string parameter with a value in pixels, for example https://barcode.orcascan.com/?data=Hello World&padding=6

QR code with limited padding
QR code with limited padding

How do I rotate the barcode to landscape?

You can generate a barcode in landscape mode using the layout=landscape query string parameter, for example https://barcode.orcascan.com/?data=Hello&text=hello&layout=landscape

QR code in landscape mode
QR code in landscape mode

Do I need to provide an API key?

No, Orca Scans goal is to simplify barcode tracking and make the technology available to all, regardless of technical skill or budget. Because of that, you don’t need to provide an API key.

Is the Barcode Image API free to use?

Yes, the Barcode Image API is completely free to use! We kindly encourage users to credit Orca Scan by mentioning: “Barcodes provided by Orca Scan” or linking to orcascan.com. Attribution helps others discover and benefit from our free barcode tools.

What is the rate limit?

You can send a maximum of 15 requests per second, exceeding this limit will result in a HTTP 503 Service Unavailable response.

How do I detect a Barcode Image API error?

The Barcode Image API always returns an image. If there’s an error, the image includes an error message with guidance. Developers can detect errors by checking the HTTP status code:

Status Message Description
200 Ok Request successful
400 Bad request Invalid parameter value
500 Unexpected error Something went wrong

How do I generate barcode images from a spreadsheet?

Use the following steps to convert a spreadsheet of barcodes values into barcode images:

  1. Register for an Orca Scan account at cloud.orcascan.com
  2. Create a sheet using the Blank Canvas template
  3. Upload your spreadsheet of barcodes
  4. Select the range of barcodes you would like to print
  5. Open the barcode preview on the left of the screen
  6. Select the barcode type you would like to generate
  7. Click download images

You will then have a zip file containing the barcode images.

Barcode Image API questions?

As with everything at Orca Scan, our Barcode Image API will evolve based on your feedback. So if you have any issues, or need help, chat with us live or drop us an email hello@orcascan.com


Ready to start scanning?