Skip to main content
Mailmark is Royal Mail’s barcode system for business mail. A Mailmark barcode identifies each mailpiece and its destination, so Royal Mail can sort it and report on its progress. It comes in two forms: a 4-state barcode and a 2D Data Matrix.

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.

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 JGB at the start before treating a Data Matrix as Mailmark data.

Scanning it in your app

Specification