Decode one
Scan or paste a barcode and see every part of it.
Make one
Generate a valid barcode from fields.
Where you’ll see it
- UK business mail sent through Royal Mail’s Mailmark services, on letters, large letters and some parcels.
- Bulk mailings, sorted and unsorted.
The 2D form
A 2D Mailmark is an ordinary Data Matrix ECC 200 with content laid out by Royal Mail. There are three sizes:
The data starts with
JGB (an identifier for Royal Mail), then a character for the type of mailing and one for the version. That’s how a scanner tells a Mailmark from any other Data Matrix on the envelope. Modules are 0.5 to 0.7 mm.
Because it’s a standard Data Matrix, any scanner that reads Data Matrix reads a 2D Mailmark.
The 4-state form
For senders who can’t print 2D barcodes, there’s a 4-state barcode with bars like the Royal Mail 4-State code:
Barcode C is for mail consolidated by a third party. Neither leaves space for the sender’s own data.
What it carries
Error correction
The 4-state formats include at least 25% error correction, which the older Royal Mail 4-State code didn’t have. The 2D form uses Data Matrix’s Reed–Solomon error correction.Variants and related types
- Royal Mail 4-State: the earlier customer barcode, which Mailmark replaced.
- Data Matrix: the barcode the 2D form is built on.
Gotchas
- Two barcodes on one envelope. If a mailpiece has two 4-state Mailmark barcodes, the consolidator’s (barcode C) takes priority.
- A Data Matrix that isn’t a Mailmark. Check for
JGBat the start before treating a Data Matrix as Mailmark data.
Scanning it in your app
Specification
- Royal Mail Mailmark barcode definition document, version 1.8, June 2025.