Barcode tools · 2D stacked
PDF417 barcode generator.
Encode text or bytes as a PDF417 symbol with the error-correction level, rows and columns you choose, then download SVG or PNG. Everything is calculated in your browser.
Tables and rules checked against ZXing and bwip-js on 30 September 2026. See sources below.
PDF417 data
Barcode
How the symbol is built
- Compaction. Printable ASCII goes through text compaction: two characters per codeword (c1 x 30 + c2) across Alpha, Lower, Mixed and Punctuation sub-modes. Anything else is converted to UTF-8 and sent through byte compaction (latch 901, or 924 when the byte count is a multiple of 6), where each group of six bytes becomes five base-900 codewords.
- Length descriptor and padding. The first codeword counts every data codeword including itself and any pad. Pad codewords (900) fill unused space in the last row.
- Error correction. Level L adds 2^(L+1) codewords, calculated modulo 929 with the published coefficient tables.
- Layout. Each row is a start pattern, a left indicator, the data columns, a right indicator and a stop pattern. Rows cycle through three clusters; the indicators carry the row count, column count and error-correction level. The symbol is 17 x columns + 69 modules wide.
Worked example: “TNAADO”, level 2, 3 columns
T and N give 19 x 30 + 13 = 583; A and A give 0 x 30 + 0 = 0; D and O give 3 x 30 + 14 = 104. With the length descriptor the data codewords are 4 583 0 104. Level 2 adds eight error-correction codewords, 226 335 505 912 335 485 146 693, so the symbol has 12 codewords: 3 columns x 4 rows, 120 modules wide, no padding. The same input at 2 columns is 6 rows; at level 2 with Auto sizing the tool picks 2 columns by 6 rows.
Limits worth knowing
- Numeric compaction, Macro PDF417, Truncated and Micro PDF417 are not implemented. Long digit strings are valid in text compaction but larger than they would be in numeric compaction.
- This page does not build AAMVA driver-licence or IATA boarding-pass payloads and does not check them. It encodes exactly what you type.
- Always scan a printed proof at final size with the scanner that will read it. Keep at least a two-module quiet zone, which the export includes.
Note: a generated symbol confirms the data was encoded to the PDF417 format rules, not that any receiving system will accept the data.
Frequently asked questions
What can a PDF417 barcode hold?
A symbol holds at most 929 codewords including the length descriptor and error correction. At error-correction level 0 that is about 1,850 text characters (two per codeword) or about 1,100 bytes in byte compaction; at level 2 it is about 1,840 characters. The tool allows up to 90 rows by 30 columns.
Which error-correction level should I use?
Levels 0 to 8 add 2, 4, 8 up to 512 error-correction codewords. Leave the level on Auto and the tool picks 2, 3, 4 or 5 by data size, which are the minimum levels ZXing recommends from the ISO table. Raise it for labels that will be scuffed or folded; every step doubles the overhead.
What is the difference between text and byte compaction?
Text compaction packs two characters into each codeword using four sub-modes (upper, lower, mixed, punctuation) and is the most compact choice for printable ASCII. Byte compaction packs six bytes into five codewords and handles any byte value. Auto picks text when every character is tab, line feed, carriage return or printable ASCII.
Why did my accented text scan as garbage?
Characters outside ASCII are sent as UTF-8 bytes preceded by an ECI 000026 code. Scanners that ignore ECI will usually read them as Latin-1 or code page 437. Test with the scanner that will be used in practice.
Does this make a driver licence or boarding pass barcode?
No. It encodes the text you type exactly. AAMVA licence data and IATA boarding-pass strings have their own field layouts that this page does not build or validate.
Is my data sent anywhere?
No. The symbol is calculated in your browser and nothing you type leaves the page.
Sources and update path
Verified 30 September 2026. The standard itself is paywalled; the tables below come from open-source implementations of it.
- Symbology: ISO/IEC 15438:2015, PDF417 bar code symbology specification (not reproduced; purchase from ISO).
- ZXing PDF417.java — cluster codeword patterns (Annex A), start and stop patterns, row and column rules. Apache License 2.0, commit 33dfdef.
- ZXing PDF417ErrorCorrection.java — error-correction coefficients (Annex F) and recommended minimum levels.
- ZXing PDF417HighLevelEncoder.java — text sub-mode tables, byte compaction six-packs.
- bwip-js 4.11.4 (BWIPP) — independent implementation used to golden-test this encoder’s output module by module.