Generate ready to print Barcode Images in multiple image formats
Code 39 is a widely used alphanumeric barcode standard that encodes 43 characters: the digits 0–9, uppercase letters A–Z, and several special characters (-, ., $, /, +, %, and space). Additionally, it includes a start and stop character represented by an asterisk (*), which is not typically displayed in the human-readable text.
Code 39 with checksum adds an optional modulo-43 checksum to the end of the encoded data for improved error detection. This checksum is calculated by summing the values of all characters in the input string and then taking the result modulo 43. The checksum is then represented as a single character and appended before the stop character in the barcode.
Each character has a specific value for checksum calculation:
Character | Value | Character | Value | Character | Value |
---|---|---|---|---|---|
0 | 0 | A | 10 | K | 20 |
1 | 1 | B | 11 | L | 21 |
2 | 2 | C | 12 | M | 22 |
3 | 3 | D | 13 | N | 23 |
4 | 4 | E | 14 | O | 24 |
5 | 5 | F | 15 | P | 25 |
6 | 6 | G | 16 | Q | 26 |
7 | 7 | H | 17 | R | 27 |
8 | 8 | I | 18 | S | 28 |
9 | 9 | J | 19 | T | 29 |
U | 30 | V | 31 | W | 32 |
X | 33 | Y | 34 | Z | 35 |
- | 36 | . | 37 | SPACE | 38 |
$ | 39 | / | 40 | + | 41 |
% | 42 |
Convert each character in the input string into its corresponding value using the table.
Compute the sum of these values.
Divide the sum by 43 and take the remainder (mod 43).
Find the character corresponding to the remainder value from the table and append it to the string.
ExampleCode 39 Extended (or Full ASCII Code 39) is an enhancement of the standard Code 39 barcode that supports encoding the entire ASCII character set (128 characters). This includes both uppercase and lowercase letters, digits, symbols, and control characters.
To calculate and encode Code 39 Extended with checksum, we extend the logic of standard Code 39 with checksum by incorporating the additional mappings of the extended character set. Here's how you can achieve this:
Code 93 is a more compact and secure barcode standard compared to Code 39. It supports the same character set as Code 39 (digits 0–9, uppercase letters A–Z, and special characters like -, ., $, /, +, %, and space) but uses a denser encoding scheme. Additionally, it includes two mandatory checksums for error detection.
Standard 2 of 5. Valid characters: [0-9]
Standard 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.
Interleaved 2 of 5. Valid characters: [0-9]
Compact numeric code, widely used in industry, air cargo
Contains digits (0 to 9) and encodes the data in the width of both bars and spaces.
Interleaved 2 of 5 + CHECKSUM. Valid characters: [0-9]. Checksum digit: automatic.
Very capable code, excellent density, high reliability; in very wide use world-wide.
CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.
CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.
CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.
CODE 128 A. Valid characters: [A-Z uppercase and control chars ASCII 0-31]. Checksum digit: automatic.
EAN-8. Accepts 7 or 8 characters (creating checksum digit if required). [0-9] numeric only
Standard EAN-12 barcode. Accepts 12 characters. Valid Characters [0-9] numeric only.
Standard EAN-13 barcode. Accepts 12 or 13 characters (creating checksum digit if required). [0-9] numeric only.
UPC-A barcode. This is a subset of the EAN-13. (098277211236) Accepts 11 or 12 characters (creating checksum digit if required). [0-9] numeric only
UPC-E barcode. Requires the UPC-A code to be entered as (e.g. 042100005264 to give 425261). UPC-A codes can be converted into valid UPC-E codes. UPC-E doesn't have a check digit encoded explicity, rather the check digit is encoded in the parity of the other six characters. The check digit that is encoded is the check digit from the original UPC-A barcode.
MSI. Modified Plessey. Valid characters: [0-9]
MSI + CHECKSUM (module 11). Checksum digit: automatic.
POSTNET barcode. Accepts 5, 9 or 11 digits. Valid characters: [0-9]. Checksum digit: automatic.
PLANET barcode. Accepts 11 or 13 digits. Valid characters: [0-9]. Checksum digit: automatic.
Royal Mail 4-state Customer barcode (SN34RD1A). Accepts: max. 9 characters. Valid characters: [A-Z,0-9] Checksum digit: automatic.
Dutch KIX version of Royal Mail 4-state Customer barcode (SN34RD1A). Valid characters: [A-Z,0-9]. Checksum digit: automatic.
Intelligent Mail Barcode - also known as: USPS OneCode 4-State Customer Barcode, OneCode 4CB, USPS 4CB, 4-CB, 4-State Customer Barcode, USPS OneCode Solution Barcode. (01234567094987654321-01234567891) Accepts: Up to 31 digits (required 20-digit Tracking Code, and up to 11-digit Routing Code; this may be 0, 5, 9, or 11 digits). If the Routing code is included, it should be spearated by a hyphen - like this example.
IMBPRE stands for Intelligent Mail Barcode pre-processed, which is a type of barcode that uses Onecode or USPS-B-3200. IMBPRE barcodes are made up of up to 65 vertical bars, which are represented by four symbols: "T" (tracker), "A" (ascender), "D" (descender), and "F" (full bar).
IMBPRE Barcode is made up of a 20-digit tracking code and a routing code field of up to 11 digits.
The tracking code includes the Barcode Identifier, Service Type Identifier, Mailer Identifier, and Serial Number.
You can visually evaluate a barcode to check its quality. Here are some things to look for:
The small dark bars or dots should be the same size as the small light bars or dots.
Authentic barcodes have clean, crisp lines and consistent spacing between the bars and digits.
Poor print quality, smudging, or irregular bar patterns may indicate a counterfeit barcode.
CODABAR. Valid characters: [0-9 '-' $:/.+ ABCD] ABCD are used as stop and start characters e.g. A34698735B
A Code 11 barcode is a numeric-only barcode that's used to encode strings of digits and dashes:
What it is: A one-dimensional (1D) barcode made up of vertical lines and spaces of varying widths
What it encodes: The digits 0–9, the dash character, and start and stop characters
How it's used: Primarily in telecommunications, but also in other niche applications
History: Developed by Intermec in 1977 and also known as USD-8
Features: Can encode strings of any length, but is limited by the width of the space it's printed in.
Structure: Consists of four parts: a start character, symbol characters, optional checksum digits, and a stop character.
Limitations: Considered weak or insecure because a single error can result in a misinterpreted character.
Also known as Pharmaceutical Binary Code or Laetuscode, a Pharmacode is a one-dimensional barcode that encodes data in binary instead of decimal.
Valid Characters: digits (0 to 9)
Valid Length: The minimum length of a Pharmacode is usually three bars, while the maximum is typically 12 to 14 bars. However, the exact length may vary based on the standard or symbology used, and any industry-specific requirements.
The length of a Pharmacode Two-Track can range from a minimum of two bars to a maximum of 16 bars:
Minimum length:
The smallest number that can be encoded is 3, which is represented by two narrow bars.
Maximum length:
The largest number that can be encoded is 131,070, which is represented by 16 wide bars.
Pharmacode Two-Track is a barcode that encodes data in binary format, rather than decimal, and is used to identify pharmaceuticals. It was developed in the late 1970s and is used for various purposes, including in-house inventory control, security verification, and ensuring that packaging materials and contents match.
Pharmacodes are decoded by analyzing the widths and positions of the bars within the code sequence. The width of the bar determines whether it represents a "0" or a "1," while the position of the bar indicates the value it represents.