Barcode Generator

Generate a Code 39 barcode from text or a number — it draws live as you type and downloads as a clean SVG that scales to any print size. Uppercase letters, digits and a few symbols, encoded entirely in your browser.

Utility ToolsTrending Free No upload Instant

Loading Barcode Generator…

Your browser is preparing the tool. It runs 100% locally.

Quick Answer

Type a line of text and the tool draws a Code 39 barcode — the widely supported 1-D symbology also called Code 3 of 9 — then lets you download it as an SVG. Code 39 carries the digits 0–9, uppercase A–Z and the symbols hyphen, period, space, dollar, slash, plus and percent, wrapping your text in the * start and stop characters. The output is vector, so it stays sharp at any size.

What the Barcode Generator Does

Enter a part number, asset tag or label text and the barcode redraws instantly underneath, with the human-readable text printed below the bars. Lowercase is converted to uppercase and any unsupported character is dropped, because standard Code 39 only carries 43 symbols. Download gives you an SVG file.

Code 39 is 'discrete' and 'self-checking': every character is encoded on its own from five bars and four spaces, three of which are wide. That simple structure is easy for even basic scanners to read, which is why Code 39 has been a workhorse for asset tags, ID badges and warehouse labels for decades.

How It Works

Each character maps to a fixed nine-element pattern — five bars and four spaces, with exactly three of the nine wide (hence '3 of 9'). The tool draws narrow elements two pixels wide and wide elements three times that, a 3:1 ratio that sits at the top of the standard's allowed 2:1 to 3:1 range for crisp, forgiving scanning.

Your text is framed with the * start and stop characters, characters are separated by a one-unit gap, and the whole symbol is emitted as inline SVG. Because SVG is vector, you can drop the file into a label template and scale it without the bars turning fuzzy.

Generation algorithm

  1. Clean the input. Convert to uppercase and drop anything outside Code 39's 43-character set: 0–9, A–Z, space, and hyphen, period, dollar, slash, plus and percent.
  2. Frame the data. Wrap the text in the * start and stop characters that every Code 39 reader looks for.
  3. Map each character. Look up each character's nine-element pattern — five bars, four spaces, three of them wide.
  4. Size the elements. Draw narrow bars at 2 px and wide bars at 6 px (a 3:1 ratio), with a one-unit gap between characters.
  5. Emit SVG. Render the bars plus the human-readable text as vector SVG and offer it for download.

Technical Details

SymbologyCode 39 (Code 3 of 9), ISO/IEC 16388
Character set0–9, A–Z, space, hyphen . dollar / plus % — 43 symbols
Start/stop* (added automatically)
Structure9 elements per character — 5 bars, 4 spaces, 3 wide
Bar ratio3:1 wide-to-narrow (narrow bar 2 px)
Bar height80 px
Check digitNone — the optional mod-43 check is not added
OutputSVG (vector), with human-readable text below
Where it runsIn your browser — nothing uploaded

Standards & references

  • ISO/IEC 16388 — the international standard for the Code 39 symbology — character patterns, bar ratios and the optional check digit.
  • Code 39 character set — 43 symbols — digits, uppercase letters and a handful of punctuation; lowercase and full ASCII need the non-standard Full ASCII extension.
  • Mod-43 check digit — an optional self-check character that some systems such as LOGMARS and HIBC require; this tool does not add one.

Accuracy & Limitations

No check digit is added. Code 39 is self-checking at the character level, so many systems do not need one — but if your scanner or standard (LOGMARS, HIBC) expects the mod-43 check character, this output will not include it.

Uppercase only. Type lowercase and it is converted; characters outside the 43-symbol set are silently dropped. Lowercase or the full ASCII range needs the Full ASCII extension, which this tool does not implement.

Code 39 is low-density — each character takes a fair amount of width, so long values produce wide barcodes. For more data in less space, Code 128 or numeric EAN/UPC pack tighter; this tool only makes Code 39.

Leave a quiet zone — a clear margin of at least ten narrow-bar widths — on each side, and do not shrink the height too far, or scanners may miss it. The SVG is just the symbol plus its text.

It encodes exactly what you type; it does not look a value up or check it against any database. A barcode is a label, not proof that the code is registered anywhere.

Real-World Use Cases

Asset and inventory tags

Label equipment, shelves or files with a code the scanners you already own understand.

ID and access badges

Print a Code 39 stripe on staff or visitor badges for quick, reliable scanning.

Internal part numbers

Turn SKUs or part numbers into scannable labels without registering them anywhere.

Forms and documents

Add a scannable reference to a printed form so it can be filed or routed by machine.

When to use it — and when not to

Good for

  • Internal asset, inventory and badge labels
  • Uppercase-and-digit codes your scanners already read
  • Labels you need as scalable vector (SVG)
  • Quick codes with no account or sign-up

Not the best choice for

  • Retail products sold in shops, which use EAN or UPC
  • Lowercase text or the full ASCII range
  • Packing long data into a small footprint

Selling at retail? Those barcodes are EAN-13 or UPC, issued through GS1. Need more data in less width, or lowercase? Code 128 is denser. Want a 2-D code for a URL? Use the QR code generator.

Frequently Asked Questions

What is Code 39?
It is the 1-D barcode also called Code 3 of 9. It encodes the digits 0–9, uppercase A–Z and a few symbols, is read by almost every scanner, and is standardised as ISO/IEC 16388. It has been used for asset and inventory labels since the 1970s.
Why are there asterisks around my barcode?
The * is Code 39's start and stop character. The tool adds one at each end so a scanner knows where the code begins and finishes. It frames the bars but is not part of the value you typed, and it is not shown in the readable text.
Does it add a check digit?
No. Code 39's mod-43 check digit is optional and this tool omits it. If your system requires the check character — some LOGMARS or HIBC setups do — this output will not satisfy it.
Can I use lowercase letters?
Standard Code 39 is uppercase only, so lowercase is converted to uppercase. Lowercase and extra symbols need the Full ASCII extension, which this tool does not implement.
Which characters are allowed?
The digits 0–9, uppercase A–Z, space, and hyphen, period, dollar, slash, plus and percent — 43 symbols in all. Anything else you type is dropped.
Why is my barcode so wide?
Code 39 is low-density: each character needs several bar-widths. Shorten the value, or use a denser symbology such as Code 128 if width is a problem — though this tool only makes Code 39.
Is this a retail or UPC barcode?
No. Retail products use EAN or UPC codes issued by GS1 and tied to a product database. Code 39 is for internal and asset use and is not registered to any product.
Do I get an SVG or a PNG?
An SVG — vector, so it scales to any label size without pixelation. Open it in a browser or design app, or convert it to PNG if a system needs a raster image.
Will any scanner read it?
Code 39 is one of the most broadly supported symbologies, so most laser and camera scanners read it without any special configuration.
Do I need a quiet zone?
Yes. Leave a clear margin of about ten narrow-bar widths on each side and keep the bars tall enough, or scanning gets unreliable.
Is my data sent anywhere?
No. The barcode is generated entirely in your browser; nothing you type is uploaded.
Can I change the bar height or ratio?
Not in this tool. It fixes an 80-pixel height and a 3:1 wide-to-narrow ratio, both within spec for reliable scanning.

References

Encodes standard Code 39 per ISO/IEC 16388 — uppercase, the 43-character set, no check digit added — as vector SVG, generated entirely in your browser.

PopularHot

QR Code Generator

QR Code Generator online: fast, lightweight and always one click away.

UtilityOpen Tool
Popular

Stopwatch and Timer

Use Stopwatch and Timer anytime, free and private, with no app to install.

UtilityOpen Tool
Popular

Online Notepad

Use Online Notepad anytime, free and private, with no app to install.

UtilityOpen Tool
Popular

Unit Converter

Unit Converter — a handy, instant browser utility you will bookmark.

UtilityOpen Tool
Trending

Random Name Picker

Use Random Name Picker anytime, free and private, with no app to install.

UtilityOpen Tool
Trending

Pomodoro Timer

Use Pomodoro Timer anytime, free and private, with no app to install.

UtilityOpen Tool

Ready to try the Barcode Generator?

It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.