Skip to content
100% local

POSTNET barcode generator

Generate or decode a POSTNET postal barcode from a ZIP code, hex value or byte list.

Output

POSTNET barcode generator

POSTNET is the tall-and-half-height bar code the US Postal Service printed on envelopes to machine-sort mail by ZIP code. This tool builds one from a number you enter, and reads one back to the number it represents — useful for testing mail-processing software, teaching how the encoding works, or checking a code by hand.

Pick a direction: Encode turns a number into bars, Decode turns bars back into a number. Number format decides how that number is read. ZIP digits treats it as plain digits — dashes and spaces in a ZIP or ZIP+4 like "12345-6789" are ignored. Hexadecimal reads it as a hex value and converts it to the decimal digits POSTNET encodes. Bytes splits a space- or comma-separated list of values from 0 to 255 into three digits each, so binary data can ride on a barcode too. Every input works out an extra check digit — the value that makes the digit sum a multiple of ten, the same one real POSTNET codes carry so a scanner can catch a misread bar.

The result is plain text: five characters per digit, T for a tall bar and H for a half bar, with a lone T at each end marking the frame (guard) bar that opens and closes a real symbol — turn Frame bars off to see just the digit patterns. Wrap the line at a fixed width for readability; decoding checks the check digit for you and reports exactly which character or group is wrong when a code doesn't parse.

Everything runs locally in your browser — the number you type and the barcode you decode never leave your device. Copy the result, download it as a .txt file, or send the output back into the input to decode what you just encoded.

FAQ

What does T and H mean in the output?
T is a tall (full-height) bar and H is a half-height bar. Every POSTNET digit is a unique five-bar pattern of two tall bars and three half bars.
What lengths of ZIP code does POSTNET support?
Real POSTNET codes are 5 digits (ZIP), 9 digits (ZIP+4) or 11 digits (delivery point). This tool also encodes other lengths for testing, but only those three match a real US mail piece.
Why did decoding fail with a check-digit error?
The last five-bar group didn't match the check digit computed from the rest — usually a mistyped or reordered group. Compare it against a freshly encoded copy of the same number.
Can I encode something other than a ZIP code?
Yes. Switch Number format to Hexadecimal or Bytes to encode any value as its decimal digits, not just a postal code.
Is my data uploaded anywhere?
No. Both encoding and decoding run entirely in your browser — nothing you type is sent to a server.