Standards/postbar
PostBar
Overview
PostBar is Canada Post's family of four-state, height-modulated barcodes: each bar is a short tracker, a tracker with an ascender, a tracker with a descender, or a full-height bar, and groups of bars encode characters 1. Canada Post Corporation patented the family in 1997. Every symbol starts with a Data Content Identifier (DCI) that tells the reader which of nine formats follows, and Reed–Solomon parity over GF(64) lets damaged codes still be read 1. Canada Post's own documents call it the "4-state barcode"; "PostBar" is the patent's name for the family 13.
Most people meet PostBar on a Business Reply Mail card or envelope. Canada Post's current Commercial Mail Customer Guide says the BRM artwork carries a 52-bar 4-state barcode with a human-readable line above it, and the mailer must print it as supplied and not alter it 3. Mailers do not encode it themselves: Canada Post supplies the artwork through its online BRM artwork tools 321. On the machineable bulk-mail indicia that Canada Post now issues for Lettermail, Personalized Mail and Postal Code Targeting, the barcode is a 16 × 16 Data Matrix symbol, not a 4-state code 6.
History
- Invention (1994–1997). Joseph Ulvr and Adrian Thong Sun Chai-Yu Kho filed US application 08/331,955 on 31 October 1994. It was granted as US Patent 5,602,382, "Mail piece bar code having a data content identifier", on 11 February 1997 and assigned to Canada Post Corporation 1. A PCT application, WO 1996/013803 "Bar code for mail processing", was filed on 27 October 1995 and published on 9 May 1996, with national filings in Australia and Canada 2. Google Patents lists the US patent as expired, with an anticipated expiry of 31 October 2014 1.
- Starting point. The patent describes two predecessors: the British Post Office four-state code, which uses four bars per character and whose start and stop bars "can easily be confused", and the Reed–Solomon code Blahut and colleagues designed for the Royal Mail in 1992, which was meant to be printed only by the post office and carried only sortation data. Canada Post's stated aim was a robust code "sufficiently flexible that it may be applied by the Post Office or the customer" 1.
- Business Reply Mail. An archived Canada Post FAQ for International Business Reply Mail, captured in December 2006, describes the 4-state barcode as the new barcode in IBRM artwork. It was height-modulated where the barcode it replaced was width-modulated, and it was "more space efficient" with built-in error correction. Canada Post said then that it would keep accepting both barcodes 5. Wikipedia says the older Code 93-type BRM barcodes were deemed non-machineable by 2013, and that a 73-bar C73 format planned for 2011 was postponed indefinitely; this page could not read the Canada Post documents it cites for either claim 17.
- Today. The 52-bar requirement appears in Canada Post's BRM Customer Guide effective 16 January 2017 4 and again in the Commercial Mail Customer Guide effective 23 March 2026 3.
No sourced document gives the year Canada Post first put PostBar into production.
Technical specification
The only public description of the structure is the patent 1. Canada Post's 4-State Bar Code Handbook exists, but its examples reportedly differ from the patent (see Status), and this page could not fetch it.
Bars. Each bar is built from up to three elements: a tracker, an ascender above it and a descender below it. The patent gives each state a value 1:
| Bar | Elements | Value | Height (patent) |
|---|---|---|---|
| H (full) | tracker + ascender + descender | 0 | 4.2–5.8 mm |
| A (ascender) | tracker + ascender | 1 | 2.6–3.7 mm |
| D (descender) | tracker + descender | 2 | 2.6–3.7 mm |
| T (tracker) | tracker only | 3 | 1.0–1.6 mm |
The patent also gives bar widths of 0.4–0.6 mm, a minimum gap of 0.4 mm, a density of about 20–24 bars per 25.4 mm and a skew limit of ±5° 1. BWIPP's encoder instead cites the Handbook's Table A for a density of 22 to 25 bars per inch, and prints 0.5 mm bars 11.
Start and stop. Both are an A bar followed by a T bar, which fixes the orientation and reading direction 1.
- A: a letter of a postal code, in 3 bars.
- N: a digit, in 2 bars.
- Z: an alphanumeric character, in 3 bars. The set has 37 characters: space, A–Z and 0–9.
- B: one machine-ID bar, read as a base-4 digit.
Data Content Identifier. Three bars right after the start bars, decoded as a Z character. Its value fixes the structure and length of everything that follows, so one reader can handle every application 1. The ranges are 1–9 for global codes, A–L for domestic, M–U for service and V–Z for internal Canada Post use 1.
Reed–Solomon. All formats use Reed–Solomon over GF(64) with 3-bar (6-bit) symbols. The field is generated by x⁶ + x + 1 111.
Formats. The patent names nine formats, PostBar.C10, D07, D12, D22, G12, G22, S06, S11 and S21, but describes only four in the text. The other five appear only in figures 1.
| Format | Use, DCI | Fields (bars) | RS code | Total bars |
|---|---|---|---|---|
| C10 | Internal, applied by Canada Post; V–Z | start 2, DCI 3, postal code ANANAN 15, parity 30, machine ID BBBB 4, stop 2 | (16,6), 10 check symbols | 56 |
| D22 | Domestic, applied by the customer; A–L | start 2, DCI 3, postal code 15, address locator ZZZZ 12, customer information 11 × Z 33, parity 12, stop 2 | (25,21), 4 check symbols | 79 |
| G12 | Global; 1–9 | start 2, DCI 3, country code NNN 6, postal code 8 × Z 24, parity 12, stop 2 | (15,11) | 49 |
| S21 | Service, applied by the customer; M–U | start 2, DCI 3, bar code sequencer 3, service information 19 × Z 57, parity 12, stop 2 | (25,21) | 79 |
Sources: the patent 1 and BWIPP's encoder 911.
- In D22 the postal code plus the address locator is called the POCI. The customer field can be split into sub-fields such as a product code, sequence number, month and day 1.
- In S21 the sequencer marks a single code, or the first or second of two concatenated codes 1.
- In G12, unused postal-code positions are filled with spaces 1.
- The C10 code can correct up to 5 symbol errors or 10 erasures 1.
Example. BWIPP's documentation gives the D22 input CH0H0H01420NOTEPAPER01. That is DCI C, postal code H0H0H0, address locator 1420 and customer information NOTEPAPER01 9.
Not published. Canada Post's "Postal Encoding Module" structures, such as D52.01 and D82.02, are not public, and BWIPP does not support them 9. The field layout of the 52-bar BRM barcode is not published in any source read for this page. A commercial Delphi component documents input layouts for D07, D12, G22, S06 and S11 20, but its service-format layouts do not match the patent's S21 description, so this page does not reproduce them.
Use cases
- Business Reply Mail. The 52-bar barcode and its human-readable line carry customer identification. The pair must stay together on the item, below the indicia near the centre of the front, 50 mm from the bottom edge 3. The ink must be black, and fluorescent inks are not allowed on BRM 4. Canada Post can charge BRM items that its sorting equipment rejects for altered or non-compliant essential elements, the barcode among them, at the non-machineable price 3. Canada Post's own BRM labels for envelopes and cards also include the 4-state barcode 3.
- Internal sortation and tracking. The patent assigns C10 to Canada Post's own machines. It carries the postal code and a machine ID and is applied by the post office 1.
- Customer-applied codes. The patent's D and S formats were designed for mailers to print postal codes, address locators and customer or service data 1. No current Canada Post guide read for this page asks mailers to print them.
- Flats and parcels. Wikipedia says PostBar is applied to flats, such as magazines, and to parcels 17. No Canada Post document read for this page confirms it.
Implementations
| Project | Language | Stars | Last active | What it does |
|---|---|---|---|---|
| bwipp/postscriptbarcode (BWIPP) | PostScript | 504 | Oct 2026 | Encoder postbar for C10, D22, G12 and S21, added in release 2026-10-18; MIT-style licence 91011 |
| Sythos/JS_Barcode_Universal | JavaScript | 2 | Nov 2026 | Encodes and decodes C10, D22 and G12 (postbarc10, postbard22, postbarg12); new in 2026 and little used 16 |
Star counts were read from the GitHub API on 6 November 2026.
- bwip-js is the JavaScript port of BWIPP that Barcoder's playgrounds use. Version 4.11.4, published 19 August 2026, bundles BWIPP 2026-05-28. Its symbol list has
auspost,royalmail,kix,japanpost,onecode,mailmarkand the genericdaft, and no Canada Post type 1213. A local check of the 4.11.4 package, and of the 4.11.0 package the wiki itself installs, found no Canada Post encoder either. PostBar should reach bwip-js when it moves to a BWIPP release dated 2026-10-18 or later 10. - Zint and OkapiBarcode do not support PostBar. Zint's manual lists Australia Post, KIX, RM4SCC, Mailmark, USPS Intelligent Mail and Japan Post under 4-state postal codes 14. OkapiBarcode's symbol list has Australia Post, KIX, Japan Post, RM4SCC and USPS OneCode 15.
- Apart from the small JavaScript library above, no open-source PostBar decoder was found.
Comparison
PostBar and Australia Post 4-State are close relatives. Australia Post's Customer Barcoding Technical Specifications (June 1998, revised 3 August 2012) use the same four bar names and values (H 0, A 1, D 2, T 3) 8. They also share these features with the PostBar patent 18:
- an A + T start and stop pair;
- 2-bar digits and 3-bar alphanumerics;
- 12 parity bars, that is four Reed–Solomon symbols over GF(64), built on the same primitive polynomial, 1 + α + α⁶.
Australia Post says it chose "a derivation that is already used successfully by other postal administrations" 8.
The tables match too. BWIPP's transcription of the PostBar patent's tables gives the same bar values as Australia Post's N table for 0–9 and its C table for A–Z and 0–9 (A = HHH, B = HHA, 0 = DDD, 1 = THH) 811. PostBar adds a separate 3-bar letter table for postal codes 11.
The two codes differ in what they carry:
- Australia Post starts with a Format Control Code and a Delivery Point ID 8.
- PostBar starts with a DCI and a Canadian postal code 1.
| PostBar | Australia Post 4-State | RM4SCC | Intelligent Mail Barcode | |
|---|---|---|---|---|
| Operator | Canada Post | Australia Post | Royal Mail | USPS |
| Bar states | 4 (H, A, D, T) | 4 (H, A, D, T) | 4 | 4 |
| Format selector | DCI, 3 bars | Format Control Code | none | none |
| Error control | Reed–Solomon, GF(64) | Reed–Solomon, GF(64) | check digit | not covered here |
| Lengths | 49, 56 or 79 bars (patent), 52 (BRM) | 37, 52 or 67 bars | variable | not covered here |
| Public spec | patent only | yes | yes | yes |
| bwip-js type | none yet | auspost |
royalmail |
onecode |
RM4SCC uses a check digit, not Reed–Solomon 14. Royal Mail's Mailmark 4-state code, developed in 2014 to replace RM4SCC, adds Reed–Solomon 14.
Choosing. A mailer has no choice in Canada. Canada Post issues the BRM barcode in its artwork, and the bulk-mail indicia use its 2D Data Matrix 36. Software that has to render PostBar can use BWIPP for the four formats the patent describes 9.
Fun facts
- The DCI was the patent's central idea: it "indicates the structure and length of the following data field so that when the code is read it will be recognized and read properly", so one reader can serve both post-office and customer codes 1.
- The patent family has lapsed: Google Patents lists the PCT application as ceased and the Australian filing as abandoned 2.
Status
Active, in one visible role. Canada Post's Commercial Mail Customer Guide, effective 23 March 2026, still requires the 52-bar 4-state barcode on Business Reply Mail. Canada Post also prints its own fluorescent barcode on the back of machineable items, in a 140 mm × 15 mm area that must stay clear 3.
Bulk Lettermail has moved to 2D. Canada Post's postal indicia requirements (January 2022) make a 2D barcode a Canada Post element of the indicia for Personalized Mail, Postal Code Targeting and Lettermail. The barcode is a square Data Matrix with 16 rows and 16 columns and one data region, black on white, with cells of 0.508–0.635 mm, a quiet zone of twice the cell size, and print quality of at least Grade B under ISO/IEC 15415 6. For Postal Code Targeting, Canada Post describes it as "a unique 34-character string that contains the address information used in delivery". The mail service provider creates it from data files Canada Post supplies, and Canada Post accepts A- or B-grade codes 7. A 2018 trade article says that "machineable mail requires a static 2D barcode in the indicia" 19.
Conflicting descriptions. Wikipedia's PostBar article carries an accuracy-dispute notice dated November 2024 17. On its talk page, editors reported from 2006 to 2008 that the Handbook's examples encode the six-character postal code in 12 bars, not the patent's 15. They also reported that the examples reuse DCIs and that business reply mail does not follow the patent's layout 18. Until Canada Post publishes a specification, the patent and the encoders built from it describe the code as patented, which may differ from the live 52-bar BRM code.
Sources
Deployments
No country reports mention this standard by name.