POSTNET barcode generator
Generate or decode a POSTNET postal barcode from a ZIP code, hex value or byte list.
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.