DotCode Barcode: Specification and Scanner SDK

DotCode is a 2D barcode made of separate dots, built to be printed by high-speed inkjet and laser coders on cigarette packs, beverages and parcels. barKoder reads DotCode with the phone and tablet cameras in your iOS, Android and web apps. For tobacco track and trace, see the DotCode Barcode Scanner SDK.

DotCode

DotCode at a glance

DotCode key facts
Type2D matrix symbology of separate round dots, set like the dark squares of a checkerboard in a rectangular grid
Character set and dataAll 128 ASCII characters, extended ASCII (128-255) and binary data. Other character sets through ECI. GS1 data when the symbol starts with two digits.
Capacity and sizeNo fixed maximum: the encoder sets the number of rows and columns, and their sum is always odd. Codes are typically at least 7 dots high, and about 124 dots in either direction is the practical limit of most printers.
Error correctionReed-Solomon
StandardAIM International Symbology Specification DotCode, revision 4.0 (2019). GS1 DotCode is defined in the GS1 General Specifications.
Typical usesCigarette and tobacco packs for EU traceability, high-speed beverage lines, shipping labels

What DotCode is and how it is built

DotCode was introduced in 2009 for high-speed marking, where printers can't reliably place touching or connected dots. Industrial inkjet and laser coders print each module as a single dot, so a DotCode can be applied to every pack on a fast production line. AIM publishes the specification, and revision 4.0 dates from 2019.

Every symbol has these parts:

  • Dot grid: data dots on alternating positions, like the dark squares of a checkerboard. The dots never touch.
  • Rows and columns: chosen by the encoder to fit the space. The height plus the width in dots is always an odd number, for example 12 x 23.
  • Data and error correction: the dots carry the encoded data and Reed-Solomon error correction, so a code with missing or damaged dots can still be decoded.
  • Quiet zone: a blank margin three dots wide on all four sides.

DotCode packs ASCII text, serial numbers with variable length, expiry dates and unique identifiers into a small area. That is why it fits the narrow print area on a cigarette pack. A symbol that starts with two digits carries GS1 data.

DotCode dot grid 12 dots high and 23 dots wide with its quiet zone
A DotCode grid 12 dots high and 23 dots wide. The sum, 35, is odd, and a quiet zone surrounds the symbol.

DotCode variants

There is one DotCode symbology. What changes is the data it carries and how it is marked.

DotCode variants and what they mean for scanning
VariantWhat it isScanning notes
DotCodeThe AIM symbology, current revision 4.0, carrying ASCII, extended ASCII or binary dataDecoder constant Dotcode
GS1 DotCodeDotCode that starts with two digits and carries GS1 Application Identifiers. GS1 uses it only to meet the EU tobacco traceability regulation, EU 2018/574.Read with the same DotCode decoder. FNC1 is the default mode.
Inkjet and laser printedPrinted at line speed by industrial inkjet or by CO2 and fiber laser codersUse the recommended DotCode configuration for your platform
Direct-marked DotCodeDotCode marked on the item itself in industrial track-and-tracebarKoder reads direct-marked DotCode alongside DPM Data Matrix and QR

Where DotCode is used

DotCode shows up wherever products are coded at high speed and each item needs its own identity.

Tobacco manufacturing

EU TPD II, EU 2018/574

Under the EU Tobacco Products Directive and the EU tobacco traceability regulation, DotCode is printed across the tobacco supply chain, mostly at pack level. GS1 DotCode exists only to meet that regulation.

Barcode scanning for manufacturing →

Food and beverage

Serialization, batch tracking

Fast beverage lines, alcohol in particular, use DotCode for serialization: tracking and authenticating products, tracing raw materials and batches, and food safety compliance.

Barcode scanning for food and beverage →

Logistics

Shipping labels, pallets

Shipping and postal organizations use DotCode on labels to track packages, pallets and containers, because it stays readable after rough handling in transit.

Barcode scanning for logistics →

Scanning DotCode with barKoder

The barKoder Barcode Scanner SDK reads DotCode on iOS, Android, the web, Windows and Linux, and in Flutter, React Native, .NET MAUI, Capacitor, Cordova, NativeScript and Python apps. The full product story, including tobacco track and trace and reading tests, is on the DotCode Barcode Scanner SDK page.

DotCode Barcode Scanner SDK

How barKoder reads DotCode on tobacco packs, beverages and shipping labels, the reading performance tests, supported platforms and a testing sheet.

DotCode Barcode Scanner SDK →

A tuned DotCode configuration

The docs give a recommended DotCode setup for every SDK: a wide, short region of interest that matches the code's shape, plus decoding speed and camera resolution settings for best performance.

DotCode docs example →

Direct-marked DotCode

barKoder reads direct-marked DotCode as well as printed codes. inexto uses it in factory and logistics track-and-trace, where it reads DPM Data Matrix, DotCode and QR codes.

inexto customer story →

Test codes in minutes

The web demo has a DotCode scanning template, and the free barcode generator creates DotCode images you can print or show on screen to test your app.

Free barcode generator →

DotCode reader and decoder API

Enable only the decoders you need. This Web SDK example from the barKoder docs enables DotCode with the recommended settings.

Web SDK (JavaScript)

JavaScript
Barkoder.setEnabledDecoders(Barkoder.constants.Decoders.Dotcode);

Barkoder.setRegionOfInterest(30, 40, 40, 9);

Barkoder.setDecodingSpeed(Barkoder.constants.DecodingSpeed.Slow);
Barkoder.setCameraResolution(Barkoder.constants.CameraResolution.FHD);

The first line enables the DotCode decoder. The others set a wide, short region of interest, slow decoding and Full HD resolution, as the docs recommend for DotCode.

Get scanning in three steps

  1. Get a free trial license and install the SDK for your platform.
  2. Enable the DotCode decoder and apply the recommended region of interest, speed and resolution.
  3. Read the result in your callback and pass GS1 DotCode strings to your traceability system. With GS1 formatting on, the GS1 parser returns each Application Identifier as a field, for example (01) GTIN, (10) batch and (17) expiry.
See the Web SDK example

DotCode examples for other platforms: Android, iOS, Flutter, React Native, Capacitor, Cordova, .NET MAUI, NativeScript and Python.

Scan a DotCode on your phone or in your browser

Install the free barKoder demo app, or open the web demo, and scan your own DotCode packs and labels before you integrate the SDK. The web demo includes a DotCode scanning template.

iPhone and iPad

barKoder demo app for iOS

Scan with your camera, or point it at the QR code to open the App Store.

Download on the App Store
QR code linking to the barKoder demo app on the App Store

Android phones and tablets

barKoder demo app for Android

Scan with your camera, or point it at the QR code to open Google Play.

Get it on Google Play
QR code linking to the barKoder demo app on Google Play

Any modern browser

barKoder web demo

Runs the Web SDK in your browser, on desktop or mobile, with nothing to install.

Open the web demo
QR code linking to the barKoder web demo

Test with known samples. Print or display the testing sheet and scan each 1D and 2D barcode with the demo app. The data sheet summarizes the SDK for your team. Need DotCode samples of your own? Create them with the free barcode generator.

DotCode scanner and reader questions

What is a DotCode barcode?

DotCode is a 2D matrix barcode made of separate round dots on a rectangular grid. It was introduced in 2009 for high-speed industrial inkjet and laser printing, where printers can't reliably produce connected bars or squares. It encodes ASCII, extended ASCII and binary data with Reed-Solomon error correction, and its size grows with the data. AIM publishes the specification, now at revision 4.0.

What is the top mobile SDK for scanning DotCode?

The one that reads your real packs and labels on your target devices, so test candidates on your own samples, including worn and badly printed codes. barKoder reads printed and direct-marked DotCode on iOS, Android and the web, and in Flutter, React Native, .NET MAUI and other frameworks. See the DotCode Barcode Scanner SDK page for the reading tests, and start a free 30-day trial on up to 25 devices.

How do I read a DotCode with a phone?

Use an app with a DotCode decoder. To try it now, install the free barKoder demo app, or open the web demo and pick the DotCode template. In your own app, enable the decoder with Barkoder.setEnabledDecoders(Barkoder.constants.Decoders.Dotcode); and apply the recommended settings from the DotCode docs example.

How do I generate a DotCode?

The free barKoder barcode generator creates DotCode images in your browser and downloads them as PNG files. Use them to test your scanning app. Production lines print DotCode with industrial inkjet or laser coders.

Is DotCode the same as a dot matrix code?

No. "Dot matrix" usually refers to dot-matrix printing, or to Data Matrix codes marked as separate dots by dot peening. DotCode is its own symbology with its own specification and decoder. barKoder reads both: DotCode with the DotCode decoder, and dot-peened Data Matrix with DPM mode.

What is GS1 DotCode?

GS1 DotCode is a DotCode that starts with two digits and carries GS1 Application Identifiers. FNC1 is its default mode. GS1 says it is used only to meet the requirements of the EU tobacco traceability regulation, EU 2018/574, which is why it appears mostly on cigarette and tobacco packs.

Add DotCode scanning to your app

Test the SDK on your own packs, bottles and labels with a free 30-day trial, or talk to an SDK expert about your project.