Advertisement

Code 39 Barcode Generator (with Full ASCII)

Create Code 39 barcodes as PNG or SVG with optional mod-43 check character and Full ASCII (Code 39 Extended) for lower-case letters and symbols.

Optional in Code 39. Some specifications (for example HIBC health-care labels) require it.
Encodes lower-case letters and symbols as two-character pairs. The scanner must have Full ASCII turned on.

Code 39 is the classic alphanumeric barcode on asset tags, ID badges, warehouse bins and US defence (LOGMARS) labels. Practically every scanner reads it, it needs no check digit, and each character is printed independently, which makes it long but forgiving. This generator draws Code 39 as PNG or SVG, can add the optional mod-43 check character and supports Full ASCII (Code 39 Extended) for lower-case letters and symbols. The barcode is drawn in your browser.

How to use this tool

  1. Type the data. Standard Code 39 allows 0-9, A-Z, space and - . $ / + %.
  2. Tick Full ASCII if you need lower-case letters or other symbols, and switch your scanner to the same mode.
  3. Tick the mod-43 check character if your labelling standard asks for one.
  4. Set the narrow bar width and the height, pick PNG or SVG and download.

Formula

Check character = (sum of character values) mod 43

Values: 0-9 = 0-9, A-Z = 10-35, - = 36, . = 37, space = 38, $ = 39, / = 40, + = 41, % = 42. The remainder is turned back into the character with that value. Every symbol starts and ends with the * start/stop character, which is never part of the data.

Example

For CODE39: C = 12, O = 24, D = 13, E = 14, 3 = 3 and 9 = 9. The sum is 75, and 75 mod 43 = 32, which is W. With the check character turned on, the bars encode *CODE39W*.

Full ASCII mode

Code 39 Extended stores characters outside the basic 43 as pairs from the standard set, following the AIM USS-39 table: a becomes +A, ! becomes /A, # becomes /C and @ becomes %V. A scanner in Full ASCII mode turns each pair back into the original character; a scanner in normal mode shows the pair literally. The text printed under the bars shows your original input.

Frequently asked questions

Why is my barcode so wide?

Each Code 39 character takes 16 narrow-bar widths including the gap, and a Full ASCII pair takes twice that. At 2 px per narrow bar, 20 characters come to about 700 px plus quiet zones. For long data, Code 128 or a QR code is much more compact.

Do I need the check character?

Usually not. Code 39 is self-checking because every character has a fixed pattern of three wide and six narrow elements. Some specifications require the mod-43 check, and the scanner must then be told to verify it.

What size should I print?

Keep the narrow bar at least 0.19 mm wide and the bars at least 6 mm tall, and leave blank space of at least ten narrow bars on both sides (this generator adds it). Use the SVG for print so the bars stay sharp.

Last updated: 2026-10-30

Advertisement