Originally developed in the 1970s, Code 39 encodes numbers, capital letters (A-Z) and some special characters. By using combinations oftwo symbols the full ASCII character set can be encoded including special characters like currency symbols.If those combinations of symbols are used the code is referred to as Code 39 Extended. The "39" in the symbology's name does not refer to the size of the encodable character set, this is a common misconception. Instead, it's short for "three of nine", from the fact that an individual symbol has nine elements (bars and spaces), three of which are wide. This naming scheme is derived from Code 2-of-5 which has five elements, two of which are wide.
Code 39 is mainly used for warehousing, in Germany and other countries it is also used for pharmaceutical products.
Code 39 at a Glance
- Type: Linear barcode symbology
- Applications: Warehousing, pharma
- Character set: A-Z, 0-9, '-', '.', ' ', '$', '/', '+', '%'
- Modes: Standard, Extended (full ASCII character set)
- Check digit: Modulo 43 (not mandatory)
- Generators: Stand-alone, barcode fonts, barcode extensions
- Scanning: CCD / Laser scanners, imagers, scanner apps
- Printing: Thermal direct, thermal transfer, laser, inkjet, dot-matrix
Code 39 Sizes, Low Density vs High Density
Code 39 has very lenient specifications and can be created with module widths ranging from 0.1 to over 5mm, same goes for the height of the code. We recommend a module width of 0.5mm and a module height of 20mm for most applications.
Likewise, the ratio of wide to narrow bars can be anywhere between 2.0 and 3.0. Smaller ratios will increase the density of the code (making it smaller for given data) but can make scanning the code more challenging.
A code with a ratio of 2.0 ("High Density" or "HD"):
A code with a ratio of 2.5 ("Medium Density"), best choice for most applications:
A code with a ratio of 3.0 ("Low Density" or "LD"):
Code 39 / Code 39 Extended Bit Pattern
const c39_bp =[ ['0','0','0','0','1','1','0','1','0','0'], ['1','1','0','0','1','0','0','0','0','1'], ['2','0','0','1','1','0','0','0','0','1'], ['3','1','0','1','1','0','0','0','0','0'], ['4','0','0','0','1','1','0','0','0','1'], ['5','1','0','0','1','1','0','0','0','0'], ['6','0','0','1','1','1','0','0','0','0'], ['7','0','0','0','1','0','0','1','0','1'], ['8','1','0','0','1','0','0','1','0','0'], ['9','0','0','1','1','0','0','1','0','0'], ['A','1','0','0','0','0','1','0','0','1'], ['B','0','0','1','0','0','1','0','0','1'], ['C','1','0','1','0','0','1','0','0','0'], ['D','0','0','0','0','1','1','0','0','1'], ['E','1','0','0','0','1','1','0','0','0'], ['F','0','0','1','0','1','1','0','0','0'], ['G','0','0','0','0','0','1','1','0','1'], ['H','1','0','0','0','0','1','1','0','0'], ['I','0','0','1','0','0','1','1','0','0'], ['J','0','0','0','0','1','1','1','0','0'], ['K','1','0','0','0','0','0','0','1','1'], ['L','0','0','1','0','0','0','0','1','1'], ['M','1','0','1','0','0','0','0','1','0'], ['N','0','0','0','0','1','0','0','1','1'], ['O','1','0','0','0','1','0','0','1','0'], ['P','0','0','1','0','1','0','0','1','0'], ['Q','0','0','0','0','0','0','1','1','1'], ['R','1','0','0','0','0','0','1','1','0'], ['S','0','0','1','0','0','0','1','1','0'], ['T','0','0','0','0','1','0','1','1','0'], ['U','1','1','0','0','0','0','0','0','1'], ['V','0','1','1','0','0','0','0','0','1'], ['W','1','1','1','0','0','0','0','0','0'], ['X','0','1','0','0','1','0','0','0','1'], ['Y','1','1','0','0','1','0','0','0','0'], ['Z','0','1','1','0','1','0','0','0','0'], ['-','0','1','0','0','0','0','1','0','1'], ['.','1','1','0','0','0','0','1','0','0'], [' ','0','1','1','0','0','0','1','0','0'], ['*','0','1','0','0','1','0','1','0','0'], ['$','0','1','0','1','0','1','0','0','0'], ['/','0','1','0','1','0','0','0','1','0'], ['+','0','1','0','0','0','1','0','1','0'], ['%','0','0','0','1','0','1','0','1','0']];
Start / Stop Characters for Code 39
Code 39 uses an identical non-encodable symbol for both start and stop characters. Usually, the barcode generator will add those two characters to the symbol automatically. When using a barcode font for Code 39, the start/stop-character is traditionally mapped to the "*" character. Formatting a string like "*12345*" with a Code 39 barcode font will then create a valid barcode (albeit without check digit). To encode a "*" with Code 39, use the combination "/B" (see table below).
Check Digit for Code 39
Code 39 uses a modulo 43 checksum scheme. The characters are summed up, modulo divided by 43, the reminder is the checkcharacter. Any character from the code set can be check character, even letters. A Code 39 without check character encoding "12345":
The same data now with check character ("F"):
When creating Code 39 with a check digit, the check character is usually not transmitted with the actual data. In most cases this behaviour must be activated manually in the barcode scanner. Consult your scanner's manual.
Character Table Code 39 Extended
Code 39 Extended code table. ASCII character to the left, the combination to encode to the right. E.g., to encode a lowercase "a" into the code, one would have to actually encode "+A":
All Softmatic barcode generators will automatically generate the appropriate two symbol codes if the data contains a character from the extended set, e.g. a small cap letter or a control character.
When using Code 39 Extended the barcode scanner has to convert the encoded character pairs to the intended value. For instance, when the code contains the sequence "+A" the scanner must output "a". For most barcode scanners this conversion has to be enabled manually, consult your scanner's manual.
Code 39 vs Code 128
Another popular choice to encode alphanumeric characters is Code 128. The biggest advantage of Code 128 that it is more compact than Code 39 when encoding small cap letters. Code 39 encoding "ABCabc123":
The same data as a Code 128 symbol (both codes were created with a module width of 0.5mm):
In addition, Code 128 features a very compact purely numeric encoding mode. Code 39 is generally a bad choice for larger amounts of data (the maximum length is around 20 characters). For more info see our comparison Code 128 vs Code 39.
Code 39 in Excel, Word or Google Docs
Code 39 is a good choice for embedding barcodes in your spreadsheet or text document. Applications include catalogs, pricelists, inventories with article numbers or serial numbers. The easiest and most straight forward way of creating Code 39 is with a Code 39 barcode font. As we've seen above, the font can create a valid barcode simply by adding "*" to the data. For creating Code 39 Extended or when a check digit is required, a macro or add-in is needed to do the necessary calculations and data conversion, for example the Softmatic barcode add-in for Excel.
Code 39 Fonts - The Space / Underscore Issue
Special caution is required when encoding data that contains a "space" or "blank", like "CODE 39". In most applications, a blank will be displayed as such, i.e. an empty space, no matter what the font contains at this specific character position. The Softmatic barcode fonts for Code 39 have the bit pattern for the space symbol at the "Underscore" character position (this position was chosen way back in 1991 because the Code 39 character set does not contain the "_"). Hence, to encode "CODE 39" with the font, you'd have to enter "CODE_39". Note that this only applies to font-based barcode creation; the Softmatic barcode extensions and generators do not use barcode fonts and data can be entered as is.
Code 39 Fonts - The Asterisk / Bold Issue
Another delightful pitfall with Code 39 barcode fonts is the auto-formatting that some Microsoft applications perform (namely Word and older versions of Excel): Entering a string like "*12345*" will remove the asterisks and render the text "12345" in bold. Recall that the "*" is the start / stop character of Code 39. Without the asterisk the barcode symbol is not valid and will not scan. Deactivate the respective option in Tools > AutoCorrect > AutoCorrect Options.
Create Code 39 / 39 Extended Barcodes in Illustrator, InDesign
Easy to use barcode plug-ins and extensions for Adobe InDesign, Illustrator und Photoshop. For more videos, see the Softmatic Youtube Channel
The Softmatic barcode plug-ins and extensions for InDesign, Illustrator and Photoshop are available on the Adobe Exchange.
Stand-alone Barcode Generator for Code 39Softmatic BarcodePlus V5 creates Code 39 and will export the barcode as PDF / SVG (resolution-independent vector) oder raster image (PNG, TIFF). The app will automatically select Code 39 Extended if the data requires it:
- Mac: Download (macOS 10.15 or higher, pre 10.15: here)
- Windows: Download (Windows 10 or higher)
Bulk Generator for Code 39
For mass creation of Code 39, see BarcodeFactory, Softmatic's bulk barcode generator:
- Mac: Download (macOS 10.15 or higher, pre 10.15: here)
- Windows: Download (Windows 10 or higher)
CODE 39 Features
The start/stop character is an asterisk (*). 9 bars and spaces are used to represent one character. More bars and spaces than other codes provide more complete reading and high reliability, as well as the largest size of barcode.
- Switch to the Add-Ins tab.
- Open the TBarCode Panel .
- Select the barcode type (e.g. Code 128).
- Enter your barcode data.
- Adjust the size of the barcode (width, height, module width etc).
- Click the button Insert Barcode . Finished!
Code 39 does not require a checksum or check digit, although a Modulo (Mod) 43 check digit can be added for increased data integrity.How do you tell if a barcode is 39 or 128? ›
A Code 39 barcode encodes 39 characters in total. Code 128 has a higher density than Code 39. Code 39 does not include a check digit, while Code 128 does.Can I generate my own barcode? ›
You can get barcode scanners on Amazon or another specialized online store for under $50. Most barcode generators are free. In fact, you can use the Barcode Font in Microsoft Word to generate your own barcodes. Therefore, with less than $100, you can create a system set to make your own barcodes.How do I generate a barcode with details? ›
To create a barcode
Select the barcode type: EAN-13, UPC-A, Code 39, or ITF. Fill in the product category information in the barcode data box. Click on the barcode title box and barcode note if you want to add them in the barcode. Add a name for the barcode in the title box and more details in the note box.
- Start by opening a new Excel spreadsheet.
- In cell A1, enter the following formula: =RANDBETWEEN(1,999999999)
- Press Enter. ...
- To create additional random numbers, copy and paste the formula in Step 2 into other cells.
Code 39 was developed in 1974 and is one of the most common 2D barcodes widely used for inventory, warehousing and industrial applications.What is check digit code? ›
A check digit, also known as a checksum character, is the number located on the far right side of a bar code. The purpose of a check digit is to verify that the information on the barcode has been entered correctly.What are check codes and check digits? ›
The last digit of a barcode number is a computer check digit which makes sure the barcode is correctly composed. Use our check digit calculator below to calculate a check digit.
The Code 39 - Full ASCII symbology is an extension of the original Code 39 (Code 39 - Regular) symbology that enables encoding of all 128 ASCII characters. The barcode reader that is used to scan the barcode must be configured to perform Full ASCII character translations.How do I identify a product by barcode? ›
Typical retail products: Indicated by a first digit of 0, 1, 6, 7, or 8. The five remaining digits on the left side of the barcode are the identify the manufacturer. The five digits on the right are the product code (determined by the manufacturer).What is barcode format? ›
A barcode or bar code is a method of representing data in a visual, machine-readable form. Initially, barcodes represented data by varying the widths, spacings and sizes of parallel lines.What is the difference between Code 39 and Code 93? ›
Advantages: A code 93 barcode is smaller and more efficient than Code 39 and has greater data redundancy, to provide higher security. It also includes 5 special characters that Code 39 does not have. Disadvantages: Unlike Code 39, Code 93 is not self-checking and, as such, requires a check digit.Is there a free barcode generator? ›
Barcode TEC-IT is the top barcode generator on Google. The page looks busy, but don't be fooled. This is a great tool for generating barcode numbers and images that are ready for use on labels, and it covers basically all of the common symbologies you might want to use, including UPC, EAN, CODE39, and CODE128.How can I create barcodes for free? ›
- 1 Select Type of Code. Select a barcode symbology, or "type." ...
- 2 Type Your Text. Enter the information you would like to encode into the barcode or QR code.
- 3 Enter Your Email. After selecting “Generate,” you will receive an email with your high-resolution barcode.
The first digit is a number system digit, which typically represents the product type. The next five digits are the manufacturer's code. And the final five digits are the specific product's identifier. UPC-E is a shorter UPC code, consisting of seven digits, which is typically used for small retail items.How do I edit a barcode? ›
From the inventory items screen, select the item with the barcode you'd like to edit. At the bottom of the screen, you will see your assigned barcode's info. Next to this info, tap “Change." From here, you can select "Replace the barcode” or “Remove the barcode.” Select "Replace the barcode."What are barcodes used for? ›
Barcodes are applied to products as a means of quick identification. They are used in retail stores as part of the purchase process, in warehouses to track inventory, and on invoices to assist in accounting, among many other uses.What kind of information can you get from a barcode? ›
A barcode is a square or rectangular image consisting of a series of parallel black lines and white spaces of varying widths. Barcode stores product related data like the date of manufacturing, expiry date, name of the manufacturer, country of the origin and price quantity of the product.
How Do Barcodes Work in the Present Day? The modern-day one-dimensional barcode is read using a scanner. This scanner sends out a laser that detects the pattern. When the laser of a particular frequency sweeps across the barcode, some light is absorbed while the rest reflects.How do I convert text to barcodes in Excel? ›
- Download and Install the Code 39 Barcode Font.
- Creating Barcodes in Excel. Converting Cell Format to Text. Enter the Values for Barcodes. Formatting the Values to Convert into Barcodes.
- Different Types of Barcodes.
- Generating Random Barcode in Excel.
- Third-Party Tools and Excel Barcode Add-Ins.
You can generate a wide range of barcodes on excel such as: Code 128. Code 39. UPC/ EAN.What is the code in barcode? ›
A bar code (often seen as a single word, barcode) is the small image of lines (bars) and spaces that is affixed to retail store items, identification cards, and postal mail to identify a particular product number, person, or location.How do I decode a one direction barcode? ›
In most cases, 1D barcodes are read from left to right. The widths of the spaces and bars relate to a specific character in the barcode. A quiet zone or margin is the white space to the left and the right of the barcode; this helps the reader to locate the barcode.How much data can a PDF417 barcode hold? ›
These barcodes are extremely high density and can support up to 7,089 characters on a single label. PDF417: Up to 2,710 characters. The PDF417 barcode pattern uses four bars and spaces in a pattern that is 17 units long and can contain from three to 90 rows.How do you read barcode digits? ›
The first six numbers of the barcode is the manufacturer's identification number. The next five digits represent the item's number. The last number is called a check digit which enables the scanner to determine if the barcode was scanned correctly.How do I identify an item from a barcode? ›
Typical retail products: Indicated by a first digit of 0, 1, 6, 7, or 8. The five remaining digits on the left side of the barcode are the identify the manufacturer. The five digits on the right are the product code (determined by the manufacturer).What does the first digit of a barcode mean? ›
The typical UPC-A barcode has 12 numerical digits, starting from left to right. The very first digit is known as a standard number system character. This number is assigned by GS1 and identifies a product category, either general or specific. The first set of 5 digits identifies the product manufacturer.What does the 13 digit in a barcode mean? ›
The EAN-13 barcode encodes a GTIN-13 and is used to identify individual items at retail point of sale. It can also be used for trade units sold to consumers, e.g. a case of wine. Encodes a GTIN-13. Does not support attributes, e.g. use-by date and/or barcode identifiers. Used for items you want to sell at retail POS.
Barcodes typically store product information such as price and weight, date of manufacture, expiration date, and the manufacturer's name. The greatest limit on a barcode is that the more information stored, the larger the barcode must be.Are all barcodes 12 digits? ›
UPC (technically refers to UPC-A) consists of 12 digits that are uniquely assigned to each trade item. Along with the related International Article Number (EAN) barcode, the UPC is the barcode mainly used for scanning of trade items at the point of sale, per the specifications of the international GS1 organisation.Do barcodes represent numbers? ›
The bars are used to represent the binary digits 0 and 1, sequences of which in turn can represent numbers from 0 to 9 and be processed by a digital computer. The presence or absence of a bar of a particular width in a particular position in a sequence is read by the computer as either a 0 or 1.What barcode uses 12 digits? ›
The UPC symbol (Universal Product Number) is the barcode representation of the GTIN-12 which consists of twelve numeric characters that uniquely identify a company's individual product.How much data can a barcode hold? ›
The maximum data limit is 1556 bytes. Error correction is built into these barcodes to increase readability, so even if one or more cells are damaged, the data can still be read. A Data Matrix barcode can store up to 2,335 alphanumeric characters.How many types of barcodes are there? ›
Barcodes are available in two different types: Linear barcodes and two-dimensional matrix barcodes.What are three types of barcodes? ›
Numeric-Only Barcode Symbologies. Alpha-Numeric Barcode Symbologies. Two-Dimensional Barcode Symbologies.Can barcodes start with 0? ›
Note that EAN-13 codes beginning with 0 are actually 12-digit UPC codes with prepended 0 digit. In recent years, more products sold by retailers outside the United States and Canada have been using EAN-13 codes beginning with 0, since they were generated by GS1-US.
Each barcode is unique to the product that it represents. There are many different types of barcodes but the two types that are standard in retail are UPC and EAN.