Illustrative DataMatrix pattern
What you're looking at
A DataMatrix code is a two-dimensional matrix barcode. The solid L-shaped border on two sides (the "finder pattern") helps scanning equipment orient the code correctly. The dotted border on the other two sides (the "timing pattern") defines the grid dimensions.
The interior cells encode the data — each black or white cell represents a binary digit (1 or 0), and together they form the encoded string.
What is a DataMatrix Code?
DataMatrix is an international standard for two-dimensional matrix barcodes (ISO/IEC 16022). It was developed in the 1980s and is widely used in industrial, medical, and postal applications where a large amount of data needs to be encoded in a small physical space.
Unlike a QR code (which uses square modules arranged in a square grid with three corner markers), a DataMatrix code uses a distinctive L-shaped solid border on two sides and an alternating border on the other two sides. This structure allows scanning equipment to determine the code's orientation and size before reading the data.
DataMatrix vs QR Code
| Feature | DataMatrix | QR Code |
|---|---|---|
| Standard | ISO/IEC 16022 | ISO/IEC 18004 |
| Shape | Square or rectangular | Square only |
| Finder pattern | L-shaped solid border | Three corner squares |
| Data capacity | Up to 2,335 alphanumeric chars | Up to 4,296 alphanumeric chars |
| Minimum size | Very small (2×2mm practical) | Slightly larger minimum |
| Royal Mail use | Yes — all barcoded stamps | No |
JGB Strings: What's Inside the Barcode
When the DataMatrix code on a Royal Mail barcoded stamp is decoded, it produces a text string beginning with JGB_ — the UPU Country Code identifying it as a UK postal DataMatrix. This is followed by a structured sequence of fields encoding everything about that individual stamp.
Real Example — 2nd Class Machin Barcoded Stamp
Format Codes
Class Codes
Origin Codes
Decoding a Barcode Stamp
The Modern GB Stamp Decoder App is designed specifically to scan and interpret the DataMatrix codes on Royal Mail barcoded stamps. When you scan a stamp with the app, it:
- Reads the barcode with your phone's camera
- Shows the value, colour, issue, print date and origin in plain collector terms
- Matches the stamp to its entry in the Modern GB catalogue
- Keeps the raw barcode data there for those who want it
- Saves the stamp to your collection, Mint or Used