Skip to content
ToolMoose

Barcode Generator

Generate a scannable Code 39 barcode from any text or number, and download it.

Code 39 supports A-Z, 0-9, space, and - . $ / + % (auto-uppercased).

Code 39 barcode
*TOOLMOOSE*

Encoded value: *TOOLMOOSE*

Worked examples

Encode TOOLMOOSE
The tool wraps the text as *TOOLMOOSE* with start/stop guards and draws 11 character patterns plus quiet zones. Download it as SVG for print or PNG for the web.
Encode an asset tag like ASSET-042
Code 39 handles letters, digits, and the hyphen, so ASSET-042 encodes cleanly as *ASSET-042* with no checksum required.
Encode a serial number 100237
Pure digits work fine. 100237 becomes *100237*, a 6-character barcode any laser or camera scanner set to Code 39 can read.
Mixed input with a bad character
Type ITEM#7 and the # is unsupported, so the tool skips it, tells you which character it dropped, and encodes *ITEM7*.

How the barcode generator works

This tool encodes your text as a Code 39 barcode, one of the oldest and most broadly supported linear (1D) barcode symbologies. Everything happens in your browser: type a value, and the generator draws a scannable barcode as an SVG you can download.

Code 39 got its name because each character is built from 9 elements (5 bars and 4 spaces), of which exactly 3 are wide. Every element is either narrow or wide, and a scanner reads the pattern of widths rather than exact measurements. That width-ratio design is what makes Code 39 forgiving about printing size.

The character set

Code 39 can encode 43 characters:

  • Letters: A to Z (uppercase only, so this tool auto-uppercases your input).
  • Digits: 0 to 9.
  • Symbols: space, and - . $ / + %.

If you enter anything outside that set (for example #, @, or a lowercase-only accent), the generator skips it, encodes the valid part, and tells you which characters it dropped. So ITEM#7 becomes ITEM7.

Start and stop guards

Every Code 39 barcode is wrapped in a special guard character, the asterisk *, at both ends. So the value HELLO is actually encoded as *HELLO*. The scanner uses these guards to detect where the code begins and ends and which direction it is being read. The * is a delimiter, not data, so you never type it yourself and it cannot appear inside your text.

For example, encoding A1:

  1. Add the guards: * A 1 *.
  2. Look up each character’s 9-element pattern from the Code 39 table.
  3. Separate every character with a single narrow space (the inter-character gap).
  4. Add quiet zones (blank margins) before the first bar and after the last.

Quiet zones matter

A quiet zone is the plain white margin on each side of the barcode. Scanners need it to isolate the barcode from surrounding text or artwork. The Code 39 rule of thumb is a quiet zone at least 10 times the width of the narrowest bar. This tool adds that margin automatically, so do not crop tight against the bars when you place the image.

Sizing and downloads

Two controls affect the output:

  • Narrow bar width sets the pixel width of the thinnest bar. Everything else (wide bars, spaces, the total width) scales from it, keeping the width ratio correct.
  • Bar height is purely visual. Taller bars are easier to scan at an angle but do not change the data.

Download the result as SVG (sharp at any size, best for print) or PNG (a raster image at 2x scale, handy for the web). You can also copy the exact encoded value, including the * guards, to your clipboard.

Why Code 39 and not a retail barcode

People often reach for a “barcode maker” expecting a supermarket UPC or EAN code. Those are the wrong tool for custom text:

  • UPC-A is exactly 12 digits with a required check digit.
  • EAN-13 is exactly 13 digits, also with a check digit.
  • The leading digits are assigned by GS1 and identify a registered company and product.

You cannot turn arbitrary words like WAREHOUSE-3 into a valid UPC, and printing a fake one would collide with a real product. Code 39 has no fixed length, needs no checksum, and encodes letters as well as numbers, which is exactly why it is the standard for asset tags, ID badges, library and warehouse labels, and internal tracking. That is why this generator produces Code 39.

A note on scanning reliability

The barcode this tool produces follows the standard Code 39 patterns and will scan on hardware and phone apps set to read Code 39. Practical tips: keep the quiet zones intact, print at a size where the narrowest bar stays crisp (avoid shrinking below roughly a few thousandths of an inch), and prefer high contrast (black bars on a white background). For very long values, Code 39 barcodes get wide quickly, so keep labels reasonably short.

Frequently asked questions

What barcode format does this generate?
Code 39 (also called Code 3 of 9). It is one of the most widely supported linear barcodes and does not require a fixed length or a checksum, which makes it ideal for asset tags, badges, and internal labels that you type by hand.
Which characters can I encode?
Code 39 supports the 26 uppercase letters A-Z, the digits 0-9, the space, and seven symbols: - . $ / + %. Lowercase letters are automatically uppercased. Any other character (like # or @) is skipped, and the tool lists what it dropped.
Why not a UPC or EAN retail barcode?
UPC and EAN are fixed-length numeric formats with a required check digit, and the numbers are assigned by GS1 for real retail products. You cannot make a valid one from arbitrary text. Code 39 is the right choice for free-form labels you control yourself.
Will the downloaded barcode actually scan?
Yes. It uses the standard Code 39 bar-and-space patterns, adds the mandatory * start and stop characters, and includes quiet zones on both sides. Print it at a size where the narrowest bar is clearly resolved and most scanners set to Code 39 will read it.
What are the start and stop characters for?
Code 39 marks the beginning and end of the data with a special guard character, the asterisk (*). Scanners use it to know where the barcode starts, which direction it runs, and where it ends. The * is a delimiter only and is never part of your data.

Last updated: 2026-07-01