A barcode API for web and native app developers that lets you

Add barcode generation capabilities
to any app, in no time.

What is it?

BarcodeThis is a simple, yet powerful HTTP API that allows software developers to quickly add barcode generation capabilities to any web or mobile application. By simply making an API call providing the value you need to encode, you get in return a barcode image in either JPG, PNG, GIF, or SVG format.

Why Use BarcodeThis?

You don't have to reinvent the wheel by coding your own barcode generation solution. BarcodeThis can help you to build any website or web app that needs to generate barcodes for:

  • Product tags
  • Shipping labels
  • Concert tickets
  • Inventory tracking
  • Or any other use case that requires a linear or square barcode

Using BarcodeThis is ideal:

  • You don't have to code the whole barcode solution yourself
  • There's nothing to install
  • No need to deal with difficult or incomplete libraries
  • It supports the most popular barcode types
  • It's a simple API with query parameters for flexibility
  • All error checking is done for you
  • It's hosted on the AWS cloud with high availability
Powerful Features
Linear Barcodes

BarcodeThis supports the most popular barcode types, like Code 39, Code 128, UPC-A, UPC-E, EAN-13, EAN-8, and many more.

Square Barcodes

Generate 2D barcodes like QR Code, PDF417, and more. QR Code error correction is also supported.

Multiple Formats

Your barcodes can be generated as a JPG, PNG, GIF, or SVG image. You can also generate images as Base64 encoded strings.

Rotation

Need to rotate your barcode on the fly? BarcodeThis has you covered. Rotate your barcode image at any angle with a simple query parameter.

Custom Colors

Want to use something different than the boring black and white? You can generate barcodes with any background or foreground color combination.

How to Use

Here are a few examples of how to use BarcodeThis. To learn about the more advanced features, please check out the Documentation.

Basic

The absolute minimum required query parameters are the value you want to encode as barcode and your API token. With a basic request like this one, BarcodeThis will return a Code 39 barcode as a JPG image by default.

                        
                            https://barcodethis.io/api/v1?value=[VALUE]&api_token=[TOKEN]
                        
                    

Barcode Types

The BarcodeThis API can generate the most popular barcode types. Simply add the type query parameter to request the type you need. There are two main categories of types: Linear and Square.

Linear

BarcodeThis supports a wide variety of linear barcodes. For example, you can generate a UPC-A barcode, by passing the UPCA type in the type query string parameter:

                        
                            https://barcodethis.io/api/v1?value=12345&type=UPCA&api_token=[TOKEN]
                        
                    
UPC-A barcode image

Square

BarcodeThis also supports popular square barcodes such as QR Code. You can generate a QR Code, by passing the QRCODE type in the type query string parameter:

                        
                            https://barcodethis.io/api/v1?value=https://barcodethis.io&type=QRCODE&show_label=0&api_token=[TOKEN]
                        
                    
QR Code image

For a complete list of supported barcode types, check out the Documentation.

Image Formats

BarcodeThis can generate JPG, PNG, GIF, and SVG images. Add the format query parameter to specify which image format you wish to get.

                        
                            https://barcodethis.io/api/v1?value=Example&format=PNG&api_token=[TOKEN]
                        
                    
Barcode image

Base64 Encoding

If you want your barcode image to be returned as a Base64 encoded string, simply add the base64 query parameter, like so:

                        
                            https://barcodethis.io/api/v1?value=[VALUE]&format=SVG&base64=1&api_token=[TOKEN]
                        
                    

Laravel

In this example we get the barcode image as a Base64 encoded string.

Controller

                        
                            namespace App\Http\Controllers;

                            use Illuminate\Http\Request;
                            use GuzzleHttp\Client as GuzzleClient;

                            class WelcomeController extends Controller
                            {
                                public function show()
                                {
                                    $client = new GuzzleClient;

                                    $response = $client->request('GET', 'https://barcodethis.io/api/v1?value=Hello&base64=1&api_token=[TOKEN]');

                                    $barcode = $response->getBody()->getContents();

                                    return view('welcome', ['barcode' => $barcode]);
                                }
                            }
                        
                    

View

                        
                            <img src="{{ $barcode }}" alt="Barcode Image">
                        
                    

JavaScript

In this example we get the barcode image as an image object, then set the object as the image source.

Markup

                        
                            <img class="barcode-image" src="" alt="Barcode Image">
                        
                    

Script

                        
                            var barcodeImage = document.querySelector('.barcode-image');
    
                            fetch('https://barcodethis.io/api/v1?value=Hello&api_token=[TOKEN]').then(function(response) {
                                return response.blob();
                            }).then(function(blob) {
                                var objectURL = URL.createObjectURL(blob);
                                barcodeImage.src = objectURL;
                            });
                        
                    

Documentation

For more details on using the BarcodeThis API, check out the complete Documentation.

Need help or have any questions?

Send a message to support at barcodethis.io.