Search for a tool
Barcode 39

Tool to decrypt Barcode 39. Code 39 (or Code 3 of 9 or Alpha39) is a normalized barcode system which is being replaced by Code 128.

Results

Barcode 39 -

Tag(s) : Character Encoding, Image Processing

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!

Thanks to your feedback and relevant comments, dCode has developed the best 'Barcode 39' tool, so feel free to write! Thank you!

Barcode 39

Barcode 39 Generator

 Variante Code 39 (Recommanded) Extended Code 39 (for ASCII encoding)
 Checksum Add the control character Already included in the coded value Ignore (no control)
 Output format Image Binary Data 0=Empty and 1=Black bar Checksum value

Options

 Output format Value/Text of the Barcode Image

How to encrypt using Barcode 39 cipher?

Encryption uses an encoding table with 43 characters: the 26 capital letters, the 10 digits and some special characters (-, ., \$, /, +, % and ' ' (space). The character * can appear but it does not exist, it is only used as a delimiter for start and end.

Each character has 5 black bars and 4 white bars (9 elements in total) starting with black and alternating white and black. Each band can have 2 widths: narrow or wide (generally 3 times larger), so it is possible to binarize the code (1 for thin bands, and 0 for wide bands). Also, in these 9 elements, always 3 bands are larger, hence the name of code 39.

A barcode 39 starts with * and ends with *. Here is the character map:

Each character has 5 black bars and 4 white bars (9 elements in total), it is therefore possible to binarize the (1, 11 or 111 for black bands according to its width, 0, 00 or 000 for white bands). In these 9 elements there are 3 which are larger (between 2 and 3 times as wide) and 6 thinner. The code starts with * and ends with *.
 0 111001011 1 011011110 2 110011110 3 010011111 4 111001110 5 011001111 6 110001111 7 111011010 8 011011011 9 110011011 A 011110110 B 110110110 C 010110111 D 111100110 E 011100111 F 110100111 G 111110010 H 011110011 I 110110011 J 111100011 K 011111100 L 110111100 M 010111101 N 111101100 O 011101101 P 110101101 Q 111111000 R 011111001 S 110111001 T 111101001 U 001111110 V 100111110 W 000111111 X 101101110 Y 001101111 Z 100101111 - 101111010 . 001111011 100111011 \$ 101010111 / 101011101 + 101110101 % 111010101 * 101101011

How to decrypt Barcode 39 cipher?

Decryption requires to perform a reading of the bar according to EAN-128 standard.

Many app for smartphones or laser handshowers facilitate this work.

Example: The message is 101101011 111100110 010110111 011101101 111100110 011100111 101101011, check 101101011 at the beginning and the end to confirm it's a code 39 barcode. The replacement of each 9-bit group by their associated character in the table. Barcode value is DCODE.

Checksum is missing in this example

How to calculate the checksum character?

Associate with each character the value of its position in the alphabet of 43 characters 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. \$/+% * (starting from 0)

Add these values and calculate the result modulo 43. The control character is the one in position (sum% 43) in the alphabet.

How to recognize 39 Barcode?

The barcode has a classic graphical form (black and white lines) or a binary equivalent (1 or B for black and 0 or W for white lines).

The barcode may have a variable length. It begins and ends with the character *.

Why the barcode is named Code 39?

The bar code consists of lines in groups of 9 which 3 are wider, hence the name 3 of 9 or 39.

Source code

dCode retains ownership of the online 'Barcode 39' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any 'Barcode 39' algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any 'Barcode 39' function (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and no data download, script, copy-paste, or API access for 'Barcode 39' will be for free, same for offline use on PC, tablet, iPhone or Android ! dCode is free and online.

Need Help ?

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