MaxiCode 2D Barcode Specification

Barcode Information | Tutorials | FAQs at BarcodeFAQ.com

About the MaxiCode Barcode SymbologyExample of a Maxicode barcode symbol formatted for UPS

Maxicode is an international 2D (two-dimensional) barcode that is currently used by UPS on shipping labels for world-wide addressing and package sortation. MaxiCode symbols are fixed in size and are made up of offset rows of hexagonal modules arranged around a unique finder pattern. MaxiCode includes error correction, which enables the symbol to be decoded when it is slightly damaged.

MaxiCode symbols encode two messages; a primary message and a secondary message. The primary message usually encodes the postal code, country code and the class of service number. The secondary message usually encodes address data, but can encode other types of information as well.

MaxiCode barcodes have different modes of operation. IDAutomation MaxiCode products support the following modes:

  • 2 = US Carrier with postal codes up to 9 digits in length. Approximately 93 characters may be encoded in this mode.
  • 3 = International Carrier with alpha-numeric postal codes up to 6 digits in length.
    Approximately 93 characters may be encoded in this mode.
  • 4 = Standard Symbol encodes general information for purposes other than the shipping industry.
    Approximately 90 characters may be encoded in this mode.
  • 5 = Secure Symbol encodes general information with more error correction.
    Approximately 74 characters may be encoded in this mode.

Symbol Size, Tolerance & MaxiCode Font

The size and tolerance range of the MaxiCode symbol is noted below in millimeters. The sizes listed include the required quiet zone of one white hexagon on each side of the symbol, referred to as 1x. The allowable tolerance from the nominal size is approximately 5%. When using the IDAutomation MaxiCode Font 6 points is usually best.

NominalMinimumMaximumMaxiCode Font at 6 Points*
Width28.14mm26.48mm29.79mm28.10mm
Height26.91mm25.32mm28.49mm26.70mm
Bullseye07.74mm07.35mm08.16mm07.72mm

* The printed size of the IDAutomation MaxiCode Font may vary slightly depending on the printer and labels used. IDAutomation recommends printing the MaxiCode Font at 300 DPI or greater. When scanned from the screen, the font should be printed at 8 points.

The IDAutomation MaxiCode Font Package includes two font designs, a standard hexagon version named “IDAutomation MaxiCode” and a low-resolution octagon version named “IDAutomation MaxiCode Octagon” designed for 8-12 dots per mm as defined in Annexe J of the AIM specification.

Encoding MaxiCode Symbols for UPS

Structuring MaxiCode barcode symbols for UPS shipping labels is a complex task. The information and code provided here are only examples. For more information about structuring messages to meet UPS specifications, contact the local UPS office and ask for their Guide to Labeling. All IDAutomation MaxiCode products encode data accurately according to the AIM USS MaxiCode specification. However, it is up to the implementer to structure the symbol properly.

Data Limitations and Compression

When using modes 2 and 3 for addressing, much of the symbol capacity is consumed with all of the data required. In some instances with long addresses, all of the information cannot be encoded. When this is the case, IDAutomation recommends the following:

  • Encode the data using all uppercase letters. This reduces switching modes with the symbol, which consumes more internal data.
  • Encode only the necessary information. In some mode 2 symbols, the address is not included because the tracking number will automatically determine this.
  • Abbreviate as much of the address as possible using W instead of WEST for example.
  • Compress the address and other fields with the UPS DLL. IDAutomation MaxiCode products are compatible with Compressed MaxiCode, however, they do not perform the compression. If compressed MaxiCode is to be used, the data must be compressed before it is encoded in the symbol. This is accomplished with a proprietary DLL supplied by UPS. UPS has not released the compression algorithm for this DLL so the compression could not be encoded in the IDAutomation component.

Encoding the RS, GS and EOT Control Characters

All IDAutomation Maxicode products include the ApplyTilde feature, which allows an easy method of structuring RS, GS and EOT delimiter characters in the symbol. When the data encoded begins with [)>RS01GS as required by UPS, the Country, ServiceClass and ZipCode are automatically populated and the following format is expected: [)>RS01GSYearPostalCodeGSCountryGSServiceGSmessage…

RS, GS and EOT cannot be viewed because they are non-printable characters, therefore, the Encoded Data should always be verified when symbols are created for UPS.

In the examples below, RS is ASCII 30, GS is ASCII 29 and EOT is ASCII 4. In all IDAutomation MaxiCode products, when the DataToEncode begins with [)>~, the Country, ServiceClass and ZipCode properties are automatically populated.

Java Example:
char GS = (char)29;
char RS = (char)30;
char EOT = (char)4;
rm.setData("[)>"+RS+ "01"+GS+ "96336091062"+GS+ "840"+GS+ "002"+GS+"1Z14647438"
+GS+"UPSN"+GS+"410E1W"+GS+"195"+GS+GS+"1/1"+GS+GS+"Y"+GS+"135 Lightner"+GS+
"TAMPA"+GS+"FL"+RS+EOT);
VB Example:
Dim NewMessage As String
Dim GS As String
Dim RS As String
Dim EOT As String
GS = Chr(29)
RS = Chr(30)
EOT = Chr(4)
NewMessage = "[)>" + RS + "01" + GS + "96336091062" + GS + "840" + GS + "002" + GS +
"1Z14647438" + GS + "UPSN" + GS + "410E1W" + GS + "195" + GS + GS + "1/1" + GS + GS +
"Y" + GS + "135 Lightner" + GS + "TAMPA" + GS + "FL" + RS + EOT
MaxiCode1.DataToEncode = NewMessage

Tilde Processing of Control Characters

IDAutomation MaxiCode products support the format ~??? to specify the ASCII code of the character to be encoded. This allows easy encoding of GS, RS and EOT. For example, the following data:

“[)>”+RS+ “01”+GS+ “96336091062”+GS+ “840”+GS+ “002”+GS+ “1Z14647438″+GS+”UPSN”+GS+”410E1W”+GS+”195″+GS+GS+”1/1″+GS+GS+”Y”+GS+
“135Reo”+GS+”TAMPA”+GS+”FL”+RS+EOT

May be encoded with this string:
[)>~03001~02996336091062~029840~029002~0291Z14647438~029UPSN~029410E1W~029195~029~0291/1~029~029Y~029135Reo~029TAMPA~029FL~030~004
Encoded Data Verification should be performed to ensure proper encoding.

Mode 2 (USA) Example:

[)>~03001~02996336091062~029840~029002~0291Z9999999999999999~029UPSN~029410E1W~029195~029~0291/1~029~029Y~0295500 CYPRESS PT DR~029BRADEN~029FL~030~004

Mode 3 (International) Example:

[)>~03001~02996RS19AB~029826~029002~0291Z00136111~029UPSN~029123X56~029195~029~0291/1~029~029Y~029123 CHERRY ST~029WEST SWINDON~029~030~004

Printing & Generating

The IDAutomation MaxiCode Font and Encoder may be used to print MaxiCode as a font. The IDAutomation MaxiCode font includes two types of fonts, a standard high-resolution hexagon version and a low-resolution octagon version designed for 8-12 dots per mm as defined in Annexe J of the AIM specification. Additionally, many IDAutomation Barcode Components and Applications support MaxiCode in 2D versions of the software, including Barcode Label Software Pro, .NET Standard & .NET Core, SSRS, Crystal Reports, ActiveX Barcode Control, .NET Windows Forms Control, ASP.NET Server Control and the Java Barcode Products.

When creating MaxiCode symbols, the output should always be checked for encoded data verification, symbol quality and the bullseye size.

Reading MaxiCode Barcodes

The most common method of decoding MaxiCode is with a camera-based imager. IDAutomation recommends many barcode imagers that perform keyboard emulation and receive power from the USB port, so no external power supply is needed. When a barcode symbol is read using keyboard emulation, decoded text appears at the cursor as if it had been typed from the keyboard and application integration is easily obtained.

Verifying Maxicode Symbols

Encoded Data Verification:

The IDAutomation SC7USB 2D Imager, with Control + ASCII Mode enabled, may be used to view the non-printable RS, GS and EOT lower ASCII functions with the free Barcode Scanner ASCII Decoder application. To perform the verification, simply open the application and scan a MaxiCode symbol.

Fig 1.
MaxiCode test symbol, resulting decoded data and application screen-shot.
Example of a Maxicode barcode symbol formatted for UPS

 

 

 

 

 

Decoded data from the Free Barcode Scanner ASCII String Decoder:

[)><RS>01<GS>96336091062<GS>840<GS>002<GS>1Z14647438<GS>UPSN<GS>410E1W<GS>195<GS><GS>1/1<GS><GS>Y<GS>135Reo<GS><CR>TAMPA<GS>FL<RS><EOT>

ASCII Decoder screenshot

Symbol Quality:

The quality of printed symbols may be verified with the Print Quality Assessment utility found in the IDAutomation 2D Barcode Scanner. The test will show the data encoded, grade the symbol and report the encoding mode. If this scanner is also used for encoded data verification, Control + ASCII Mode must be enabled.

The report below was generated when scanning a MaxiCode barcode symbol with PQA enabled:

[)>01963360910628400021Z14647438UPSN410E1W1951/1Y135ReoTAMPAFL
>> PQA <<
MAXICODE: Mode 2
X roughly = 0.023"
[A] < Data Safety Margin = 100%
[A] < Horizontal Print Growth = +13% of X
[A] < Vertical Print Growth = +18% of X
Bullseye Size:

When creating MaxiCode symbols with graphic products, the DPI or Resolution property should be set to closely match the resolution of the printer and the distance the inner dots are from the outer circle of the bullseye according to the Symbol Size and Tolerance chart. Some of the inner dots should be very close to the bullseye, so that they are almost touching it. If they are not, increase or lower the DPI or Resolution property slightly until the symbol looks correct. This rare issue may occur because some combinations of printers and resolutions calculate and round down the size of the bullseye.

More Information