Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Generate a Code 39 barcode from text as a scannable SVG.
This tool generates a Code 39 barcode -- one of the oldest and most widely supported 1D (linear) barcode standards, readable by virtually any barcode scanner. Code 39 supports uppercase letters, digits, space, and the symbols - . $ / + %.
Enter text using Code 39's supported character set. A scannable SVG barcode renders instantly, downloadable for printing or embedding.
Each character maps to a fixed pattern of 5 bars and 4 spaces (9 elements total), where each element is either "narrow" or "wide" (a 1:3 width ratio), per the published Code 39 reference table. A start/stop character (*) is automatically added at both ends, as the standard requires.
For a 2D scannable code (which can hold URLs and more data) instead, see the existing QR Code Generator.
The tool draws only the black bars, as SVG rectangles. Narrow elements are 2 units wide and wide elements are 6 units wide (the 1:3 ratio), and the bars are 60 units tall. Every character, including the start and stop asterisks the tool adds for you, occupies nine elements plus a narrow gap between characters. Since each Code 39 character has exactly three wide elements out of nine, every character takes 6 narrow (12 units) plus 3 wide (18 units) plus a 2-unit gap, which is 32 units.
Total width = (number of characters + 2) x 32 units
Take the hypothetical asset tag HELLO123. It has 8 characters, plus the two asterisks makes 10, so the SVG is 10 x 32 = 320 units wide and 60 tall. Add one more character and the barcode grows by exactly 32 units. This predictability is handy when you need to know whether a label will fit before you print it: multiply the length by 32, then scale to your label size.
If you enter a character outside Code 39's set, such as an underscore, an at sign, a comma or an accented letter, the tool shows an error naming the unsupported character rather than producing a bad barcode. Remove or replace the character. Leading and trailing spaces are trimmed, and an empty field shows no barcode at all.
Code 39 is long for the amount of data it stores, since each character costs 32 units in this tool. For retail products you need UPC or EAN codes assigned through the proper numbering authority, which this tool does not produce. For long strings or full URLs, a 2D code is far more compact.
Uppercase A-Z, digits 0-9, space, and the symbols - . $ / + % -- lowercase letters aren't supported and are automatically uppercased.
Code 39 is one of the simplest and most universally scannable 1D formats, widely used in inventory, ID badges, and logistics -- a solid general-purpose choice when you don't need a specific industry standard like UPC/EAN (retail) or Code 128 (higher density).
Yes -- it's generated from the standard published Code 39 pattern table, so it should scan correctly with any Code-39-compatible scanner or scanning app, assuming adequate print size and contrast.
Common causes are a missing quiet zone, a dark or busy background, scaling the image unevenly, printing too small, or low print contrast. Put it on a white background with margin, keep proportions, and test at the intended print size.
Yes. The space is part of the Code 39 character set and is encoded as its own character. Note that leading or trailing spaces are trimmed before encoding.
The SVG width in units is (characters + 2) x 32, for example a 10-character value gives 12 x 32 = 384 units. Height is fixed at 60 units, but you can scale the SVG in your layout.
No. The tool encodes exactly the characters you type plus the start and stop markers. Add any check character your workflow requires before generating.
Reference: MDN Web Docs