Java Barcode Processing API

Generate, Customize & Recognize Linear, 2D and Postal barcode images from JPG, TIFF, PNG, BMP, GIF & EXIF formats within any Java-based application.

  Download Free Trial
Aspose.BarCode for Java

Aspose.BarCode for Java


Aspose.BarCode for Java is a robust and reliable API having barcode generation and recognition features for Java applications. API supports most established barcode standards and specifications and allows to read 1D & 2D barcodes from images at any angle.

Aspose.BarCode for Java API renders the barcode labels in a verity of image formats with highly flexible imaging options. Moreover, API provides barcode printing as well as encoding and decoding features for multiple symbologies.


Advanced Java barcode API Features



Specify different kinds of symbologies


Support for Checksum & Supplement data


Customizable barcode images


Support for X & Y dimension for 2D codes


Code128 encoding is exceptionally optimized


Wide to Narrow Ratio for supported symbologies


Customizable caption & font styles


Adjustable barcode text & appearance


Read barcode from images

Manipulate Barcode Labels in Many Ways

Aspose.BarCode for Java API provides the ability to manipulate barcode image borders, border color, style, margin and width as well image's background color and bar color. You can also rotate images to any angle and produce high quality bar code images with anti-aliasing. In addition to this, barcode image margins & resolution can be customized.

Customize barcode label - Java

// set code text & encoding type
BarCodeGenerator generator = new BarCodeGenerator(EncodeTypes.CODE_128, "1234567");
// format label
generator.setBackColor(Color.GREEN);"BarCodeSample.jpg", BarCodeImageFormat.Jpeg);

Recognize Barcodes from Images

Aspose.BarCode for Java is capable of reading barcode from images. BarCodeReader class which is mainly responsible for the recognition feature, supports many popular image formats including BMP, PNG, TIFF, JPEG & GIF. The barcode recognition process is highly configurable allowing you to set expected regions to find barcode labels on an image, apply manual recognition hints to optimize the scan & apply binarization filters on the image.

Read barcode type & text from image - Java

// initialize barcode reader with image & expected barcode type
BarCodeReader reader = new BarCodeReader(dir + "barcode.png", DecodeType.ALL_SUPPORTED_TYPES);
// read barcode
while ( {
	// print the barcode type & text
	System.out.println("Type: " + reader.getCodeType() + " Text: " + reader.getCodeText());

Supported Barcode Symbologies

Aspose.BarCode for Java API includes support for a large number of linear, 2D and postal barcode symbologies:

  • EAN13 (Encode, decode)
  • EAN8 (Encode, decode)
  • UPCA (Encode, decode)
  • UPCE (Encode, decode)
  • Interleaved2of5 (Encode, decode)
  • Standard2of5 (Encode, decode)
  • MSI (Encode, decode)
  • Code11 (Encode, decode)
  • Codabar (Encode, decode)
  • EAN14(SCC14) (Encode, decode)
  • SSCC18 (Encode, decode)
  • ITF14 (Encode, decode)
  • Matrix 2 of 5 (Encode, decode)
  • PZN (Encode, decode)
  • Code128 (Encode, decode)
  • Code39 Extended (Encode, decode)
  • Code39 Standard (Encode, decode)
  • Code93 Extended (Encode, decode)
  • Code93 Standard (Encode, decode)
  • IATA 2 of 5 (Encode, decode)
  • OPC (Encode, decode)
  • GS1Code128 (Encode, decode)
  • ISBN (Encode, decode)
  • ISMN (Encode, decode)
  • ISSN (Encode, decode)
  • ITF6 (Encode, decode)
  • VIN (Encode, decode)
  • Pharmacode (Encode, decode)
  • DatabarOmniDirectional (Encode, decode)
  • DatabarTruncated (Encode, decode)
  • DatabarLimited (Encode, decode)
  • DatabarExpanded (Encode, decode)
  • PatchCode (Decode)
  • Supplement (Decode)

Supported 2D Barcode Symbologies

  • PDF417 (Encode, decode)
  • MacroPDF417 (Encode, decode)
  • DataMatrix (Encode, decode)
  • Aztec (Encode)
  • QR (Encode, decode)
  • Italian Post 25 (Encode, decode)
  • GS1DataMatrix (Encode, decode)

Supported Postal Barcode Symbologies

  • Postnet (Encode, decode)
  • Planet (Encode, decode)
  • USPS OneCode (Encode, decode)
  • Australia Post (Encode, decode)
  • Deutsche Post Identcode (Encode, decode)
  • Deutsche Post Leticode (Encode, decode)
  • RM4SCC (Encode, decode)
  • SingaporePost (Encode, decode)
  • AustralianPosteParcel (Encode, decode)
  • SwissPostParcel (Encode, decode)

Support and Learning Resources


Aspose.BarCode offers individual Barcode generation and recognition APIs for other popular development environments as listed below: