Search for a tool
Barcode 128

Tool for decoding/encoding 128 barcodes, a barcode standard for encoding numbers and letters, used internationally by EAN-128 (or GS1-128).

Results

Barcode 128 -

Tag(s) : Character Encoding, Image Processing

Share
Share
dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!


Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!


Feedback and suggestions are welcome so that dCode offers the best 'Barcode 128' tool for free! Thank you!

Barcode 128

Barcode 128 Generator

 










Options









Barcode 128 Reader





Answers to Questions (FAQ)

What is the Barcode 128? (Definition)

Code 128 is a type of barcode that encodes alphanumeric data as black bars and white spaces of varying widths.

It is widely used in logistics, transportation, and inventory management due to its compact size and robustness.

A widespread industrial application is the GS1-128 standard (formerly EAN-128), which uses Code 128 symbology to structure standardized logistics data (product identifiers, batch numbers, etc.).

How to encrypt using Barcode 128 cipher?

A 128 barcode consists of a series of alternating groups of three black bars and three white spaces of varying widths (between 1 and 4 units wide).

The standard describes three encoding tables: Code 128A, Code 128B, and Code 128C. These three sets of codes allow for the representation of all ASCII characters from 0 to 127, as well as special functions (FNC1 to FNC4).

The 128 barcode begins with a series of dashes indicating Start and ends with End. Between these dashes are the characters of the message to be encrypted, each represented by six bars (three black and three white) of length 11 units.

To encode a string of characters:

1 - Start with the Start symbol corresponding to the encoding table being used.

2 - Convert each character according to the lookup table and insert the corresponding strokes

3 - Calculate the check digit (see below) and insert it afterward

4 - End with the Stop symbol

Example: To encode DCODE in 128b, encode `Start B, D, C, O, D, E, Check Digit, End' that is, the values 104,36,35,47,36,37,62,106 or as alternating bars of width 211214,112313,131321,133121,112313,132113,431111,2331112

How to decrypt Barcode 128 cipher?

Decoding involves reading the widths of the bars and spaces. This process is broken down into several steps.

1 - Identify the starting symbol (Start A, B, or C)

2 - Divide the sequence into blocks of 6 bars (11 units wide)

3 - Convert each pattern into a numerical value (0 to 106)

4 - Verify the check digit.

5 - Translate the values according to the active code set.

Example: A barcode has the raw message 2112141412211313211341111412211122141214212331112
211214 corresponds to the Start code of the 128B standard. 141221 corresponds to the character d, then 131321 for C, etc. The message contained in the barcode is dCode.

How do I calculate the EAN128 check digit?

The check digit is calculated by summing the value of the starting symbol with each value encoded in the barcode, multiplied by its position, all modulo 103.

Example: With DCODE and the 128-B encoding set, Start B = 10⁴, D = 36, C = 35, O = 47, D = 36, E = 37
The check digit calculation is 10⁴ + 1 × 36 + 2 × 35 + 3 × 47 + 4 × 36 + 5 × 37 = 680 and 680 mod 10³ = 62. The value 62 corresponds to the ^ symbol in encoding set B.

When reading a barcode, if the equality is not verified, the code is invalid. The dCode generator can, however, disregard this if necessary.

How to recognize 128 Barcode?

The barcode may have a conventional graphical form (black and white lines similar to zebra's stripes) or a binary equivalent (of 0 to vacuum and 1 white bars) or a base 4 code (1,2,3 and 4 for the size of the bar, alternating black and white).

The bar code may have a variable length. It begins (usually) by Start and ends with the character End or Stop (see table).

To encode a message of N characters, the number of units needed (between the first and last black bar) is 11 × (N + 2) + 13 units

The concepts of optical readers (laser), scanners, or barcode software/mobile applications are clues.

What is the difference between codes 128A, 128B and 128C?

Coding table 128A has ASCII characters from 00 to 95.

Coding table 128B has ASCII characters from 32 to 127.

Coding table 128C has all numeric values from 00 to 99.
idbandsbinary128A128B128C
021222211011001100SpaceSpace00
122212211001101100!!01
222222111001100110""02
312122310010011000##03
412132210010001100$$04
513122210001001100%%05
612221310011001000&&06
71223121001100010007
813221210001100100((08
922121311001001000))09
1022131211001000100**10
1123121211000100100++11
1211223210110011100,,12
1312213210011011100--13
1412223110011001110..14
1511322210111001100//15
16123122100111011000016
17123221100111001101117
18223211110011100102218
19221132110010111003319
20221231110010011104420
21213212110111001005521
22223112110011101006622
23312131111011011107723
24311222111010011008824
25321122111001011009925
2632122111100100110::26
2731221211101100100;;27
2832211211100110100<<28
2932221111100110010==29
3021212311011011000>>30
3121232111011000110??31
3223212111000110110@@32
3311132310100011000AA33
3413112310001011000BB34
3513132110001000110CC35
3611231310110001000DD36
3713211310001101000EE37
3813231110001100010FF38
3921131311010001000GG39
4023111311000101000HH40
4123131111000100010II41
4211213310110111000JJ42
4311233110110001110KK43
4413213110001101110LL44
4511312310111011000MM45
4611332110111000110NN46
4713312110001110110OO47
4831312111101110110PP48
4921133111010001110QQ49
5023113111000101110RR50
5121311311011101000SS51
5221331111011100010TT52
5321313111011101110UU53
5431112311101011000VV54
5531132111101000110WW55
5633112111100010110XX56
5731211311101101000YY57
5831231111101100010ZZ58
5933211111100011010[[59
6031411111101111010\\60
6122141111001000010]]61
6243111111110001010^^62
6311122410100110000__63
6411142210100001100NUL`64
6512112410010110000SOHa65
6612142110010000110STXb66
6714112210000101100ETXc67
6814122110000100110EOTd68
6911221410110010000ENQe69
7011241210110000100ACKf70
7112211410011010000BELg71
7212241110011000010BSh72
7314211210000110100HTi73
7414221110000110010LFj74
7524121111000010010VTk75
7622111411001010000FFl76
7741311111110111010CRm77
7824111211000010100SOn78
7913411110001111010SIo79
8011124210100111100DLEp80
8112114210010111100DC1q81
8212124110010011110DC2r82
8311421210111100100DC3s83
8412411210011110100DC4t84
8512421110011110010NAKu85
8641121211110100100SYNv86
8742111211110010100ETBw87
8842121111110010010CANx88
8921214111011011110EMy89
9021412111011110110SUBz90
9141212111110110110ESC{91
9211114310101111000FS|92
9311134110100011110GS}93
9413114110001011110RS~94
9511411310111101000USDEL95
9611431110111100010FNC3FNC396
9741111311110101000FNC2FNC297
9841131111110100010ShiftBShiftA98
9911314110111011110Code CCode C99
10011413110111101110Code BFNC4Code B
10131114111101011110FNC4Code ACode A
10241113111110101110FNC1FNC1FNC1
10321141211010000100Start AStart AStart A
10421121411010010000Start BStart BStart B
10521123211010011100Start CStart CStart C
10623311121100011101011StopStopStop

The Stop symbol has 13 modules to create an asymmetric signature facilitating end-of-read detection and optical synchronization.

What are the variants of the code 128?

Code 128 structurally has three variants: 128A, 128B, and 128C, which are internal coding sets.

Code 128 serves as a standard for GS1-128 codes (formerly EAN-128) for logistics or HIBC for the medical sector.

Other barcode standards exist: EAN-13, EAN-8, Code 39, and Code 93, each with its own structure.

What does the number/code read means?

Code 128 encodes a sequence of characters or a number without imposing any intrinsic meaning. Its meaning depends entirely on the system interpreting it; it can mean anything: the decoded number or text could be a product identifier, a tracking number, an internal reference, etc. Without access to the corresponding database, it remains a simple sequence of characters/numbers.

What is the maximum size of a 128 barcode?

The standard does not set a strict length limit. However, the practical limit depends on the print resolution and the minimum read width, which is determined by the optical reader's capacity. A barcode printed or displayed too small or too large will be unusable by most scanners.

Where to download 128 Barcode font?

dCode shares a character font file (ttf font) here (unknown source, unknown licence)

The fonts do not automatically calculate the modulo 103 key, nor do they add the Start and Stop characters; compliance with ISO/IEC 15417 is not guaranteed.

Source code

dCode retains ownership of the "Barcode 128" source code. Any algorithm for the "Barcode 128" algorithm, applet or snippet or script (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or any "Barcode 128" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) or any database download or API access for "Barcode 128" or any other element are not public (except explicit open source licence). Same with the download for offline use on PC, mobile, tablet, iPhone or Android app.
Reminder: dCode is an educational and teaching resource, accessible online for free and for everyone.

Cite dCode

The content of the page "Barcode 128" and its results may be freely copied and reused, including for commercial purposes, provided that dCode.fr is cited as the source (Creative Commons CC-BY free distribution license).

Exporting the results is free and can be done simply by clicking on the export icons ⤓ (.csv or .txt format) or ⧉ (copy and paste).

To cite dCode.fr on another website, use the link: https://www.dcode.fr/barcode-128

In a scientific article or book, the recommended bibliographic citation is: Barcode 128 on dCode.fr [online website], retrieved on 2026-03-20, https://www.dcode.fr/barcode-128

Need Help ?

Please, check our dCode Discord community for help requests!
NB: for encrypted messages, test our automatic cipher identifier!

Questions / Comments

Feedback and suggestions are welcome so that dCode offers the best 'Barcode 128' tool for free! Thank you!


https://www.dcode.fr/barcode-128
© 2026 dCode — The ultimate collection of tools for games, math, and puzzles.
 
Feedback