The guide
An envelope is written for a machine first, so write the address the way the machine reads it
Why the Postal Service asks for capitals and abbreviations, what the four-state barcode actually carries, and which strips of an envelope must stay clear.
- 65 bars in every Intelligent Mail barcode, each in one of four states
- 31 digits the most data the barcode can carry
- 28 positions for city, state and ZIP+4 on the last line of a US address
- 5/8 inch strip along the bottom of a letter kept clear for the barcode
Read the full guide Fold the guide
Most letters are read by a person only once, at the very end, when someone opens the door and picks them up. Before that, the reader is a machine moving the envelope past a camera at a speed no clerk could match. The address on the front is written for that machine first. Almost every rule about how an address should look follows from that one fact, and the rules make much more sense once you picture the reader.
How a sorting machine reads the front of a letter
The reader is called a multiline optical character reader. It photographs the address side of a letter, finds the whole address block, reads it, looks the result up in a database of addresses, and sprays a barcode onto the piece. All of that happens in a fraction of a second. From then on, barcode sorters carry the letter the rest of the way, down to the order in which a carrier walks the route.
When the reader fails, the letter does not stop. It gets a hidden fluorescent code on the back, and a picture of its face goes to a remote encoding center, where a person keys in the address from the image. The data is matched back to the letter later. That rescue works, but it is slower and costs people. A clean address avoids it.
So the Postal Service’s addressing standard, Publication 28, reads like advice to a camera. Capital letters are preferred on every line. The lines share one left margin. Characters should not touch. Punctuation may be dropped everywhere except the hyphen in a ZIP+4 Code, and the hyphen inside a house number such as 289-01. Print dark ink on a light background. None of this is etiquette; each item removes a way the optical reader can misread a line.
Abbreviations do the same work in a different way. The standard is not asking you to shorten words to save ink. It is asking you to use one agreed spelling, the spelling the Postal Service’s own address file uses, so the reader’s lookup finds a match. AVENUE, AV and AVEN all become AVE. APARTMENT becomes APT, SUITE becomes STE, and NORTHEAST becomes NE. The tables behind those changes are printed in the appendices of Publication 28, and they are long: the street suffix table alone runs to about two hundred rows.
The parts of a US address and the order of the last line
A delivery address line has up to seven parts, and Publication 28 names them in order: the primary number, a predirectional, the street name, a suffix, a postdirectional, a secondary unit designator and the secondary number. Its advice on parsing is to start from the right and work left. That sounds odd until you try it. The right end of the line holds the most predictable pieces, a unit like APT 4B or a direction like SW, and peeling them off first leaves the street name standing alone.
The edge cases are where the standard earns its length. Two directional words in a row, such as NORTH WEST, combine into NW, but NORTH SOUTH does not combine; the second word stays in the street name, spelled out. A direction between the name and the suffix belongs to the name. Two suffix words in a row, as in PARK AVENUE, keep the first spelled out as part of the name and abbreviate only the second. A single letter like N or E may be a direction or simply a letter in a street called Avenue N, and only local knowledge can tell which.
The last line has its own arithmetic. Appendix B of Publication 28 explains that two-letter state codes let the city, state and ZIP+4 fit in 28 positions: 13 for the city, one space, two for the state, two spaces, and ten for the ZIP+4. The two spaces before the ZIP are the preferred form; one is allowed. A city name longer than 13 letters is spelled in full, and if it must be shortened, only the approved 13-letter form from the City State file will do.
Those two-letter codes are older than most people assume. Five-digit ZIP Codes arrived on July 1, 1963, and the Post Office Department published its list of two-letter state abbreviations that October. The four-digit add-on followed in 1983, which is why a full code today looks like 01234-5678.
Here is the whole process on a made-up address. Typed casually it reads “Sample Recipient, 123 north main street apartment 4b, Anytown, Massachusetts 01234-5678.” In standard form it becomes three lines: SAMPLE RECIPIENT, then 123 N MAIN ST APT 4B, then ANYTOWN MA followed by two spaces and 01234-5678. Every change traces to a table row. NORTH becomes N, STREET becomes ST, APARTMENT becomes APT, and Massachusetts becomes MA. The last line comes to 22 positions, comfortably inside the 28.
What the four-state barcode carries
The barcode that machines spray, and that large mailers print themselves, is the Intelligent Mail barcode. It has 65 bars, and every bar is one of four shapes. Each has a short middle part called the tracker. It may also have an ascender above, a descender below, both, or neither. Written as letters, those states are A, D, F for full and T for tracker. The Postal Service required this barcode for automation prices from January 28, 2013, replacing POSTNET, which coded only the ZIP Code in tall and short bars.
The barcode holds up to 31 digits, in two pieces. The tracking code is always 20 digits: a two-digit barcode identifier whose second digit runs only from 0 to 4, a three-digit service type, a mailer ID of six or nine digits, and a serial number that fills the rest. The routing code is the ZIP Code with no digits, five, nine or eleven, the last two being the delivery point. The specification, USPS-B-3200, is explicit that the routing code is never padded with zeros.
Turning those digits into bars takes six steps. The digits are folded into one large binary number. An 11-bit frame check sequence is computed over its rightmost 102 bits with the generator 0xF35. The number is split into ten codewords. Two small adjustments mark the barcode’s orientation and carry the top check bit. Each codeword becomes a 13-bit character taken from two generated tables. Finally the 130 character bits are dealt out to the 65 bars, two to a bar, in an interleaved order the specification prints as a table. The characters are chosen so that flipping any single bit produces an invalid character, which lets a reader detect a misread bar.
The worked example printed in the specification is worth reproducing, because it is the test every encoder must pass. Take barcode identifier 01, service type 234, mailer ID 567094, serial 987654321 and routing code 01234567891. The frame check comes out as 751 in hexadecimal. The codewords are 14, 787, 607, 1022, 861, 19, 816, 1294, 35 and 301. The bars begin AADTF and run for 65 letters. A single wrong digit anywhere changes most of them.
That is also why the barcode needs a mailer ID. The tracking code is a promise that this particular piece, from this particular sender, can be followed through the network. The Postal Service assigns mailer IDs; six-digit IDs begin with a digit from 0 to 8 and nine-digit IDs begin with 9, so the two lengths can never be confused. A made-up mailer ID produces a barcode that is perfectly well formed and means nothing. A real one is the only kind worth printing.
Envelope sizes and the strips that must stay clear
The mail manual is just as exact about where things go. A letter, for automation, is between 5 and 11-1/2 inches long and between 3-1/2 and 6-1/8 inches high, with a length divided by height between 1.3 and 2.5. The familiar No. 10 business envelope, 4-1/8 by 9-1/2 inches, sits well inside those limits. So does DL, 110 by 220 millimetres, one of the sizes from ISO 269, a standard withdrawn in 2009 without a replacement. C5, at 162 by 229 millimetres, is taller than 6-1/8 inches, so the letter rules no longer describe it.
None of these zones is printed on a real envelope. Each is measured from the edges, so choosing a different envelope size moves every one of them.
On the face of a letter, the address belongs in an imaginary box called the OCR read area. It starts half an inch in from each side and runs from 5/8 inch to 2-3/4 inches above the bottom edge. Below it lies the barcode clear zone: the bottom 5/8 inch strip, from the right edge back 4-3/4 inches. Nothing but a barcode belongs there. If you print the barcode in that corner yourself, its leftmost bar must sit between 3-1/2 and 4-1/4 inches from the right edge, and the bars must stay between 3/16 and 1/2 inch above the bottom.
The alternative is to put the barcode inside the address block, above the recipient’s name. Then it must sit at least 0.028 inch and at most 5/8 inch above that line, with a clear eighth of an inch at each end. The bars themselves have tight tolerances: about 22 to the inch, each 0.020 inch wide, plus or minus 0.005. Whatever prints them has to hit those numbers at true size, which is why an envelope file should be printed at 100 percent.
Mail abroad, and what formatting cannot tell you
For mail leaving the country, the rules reverse their emphasis. Publication 28 asks for the destination country alone on the bottom line, written in full and preferably in capitals, with no postal code on that line. Everything above it follows the habits of the country it is going to, which is why a careful formatter leaves those lines as they were typed rather than forcing them into an American shape.
Canada is the one country Publication 28 treats on its own. Its provinces and territories have two-letter codes too, and two spaces go between the province code and the postal code.
There is a limit to all of this, and it matters. Standardizing an address makes it readable; it does not make it real. Nothing in the spelling of a line can tell you whether the building exists, which ZIP+4 it carries, or whether a carrier delivers there. Those answers live in the Postal Service’s own address files, and Publication 28 itself defines a complete address as one that matches them. A formatter can tidy what you typed and encode the numbers you hold. It cannot vouch for the destination.
Sources
Every source consulted for this guide. Links checked October 25, 2026.
- Publication 28 - Postal Addressing Standards United States Postal Service, Postal Explorer (October 2024 edition)
- 222 Punctuation United States Postal Service, Publication 28
- 223 Spelling of City Names United States Postal Service, Publication 28
- 224 Format United States Postal Service, Publication 28
- 23 Delivery Address Line United States Postal Service, Publication 28
- 233 Directionals United States Postal Service, Publication 28
- A1 Readability United States Postal Service, Publication 28
- A3 International Addresses United States Postal Service, Publication 28
- Appendix B United States Postal Service, Publication 28
- C1 Street Suffix Abbreviations United States Postal Service, Publication 28
- C2 Secondary Unit Designators United States Postal Service, Publication 28
- 202 Elements on the Face of a Mailpiece United States Postal Service, Domestic Mail Manual
- 201 Physical Standards United States Postal Service, Domestic Mail Manual
- Intelligent Mail Barcode 4-State, Specification USPS-B-3200 United States Postal Service, PostalPro
- Intelligent Mail barcode Wikipedia
- ZIP Code Wikipedia
- Envelope Wikipedia
- Multiline optical-character reader Wikipedia
- POSTNET Wikipedia