Skip to content
ForgePlug — Logo
barcode100% Browser-BasedUpdated Jul 2026

Barcode Generator

A premium barcode generator that creates professional, print-ready barcodes entirely in your browser. Supports all major barcode standards including CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, and Codabar. Each format includes detailed validation with helpful error messages. Customize every aspect — width, height, margin, font size, font family, text position, and colors. Preview changes in real time, then download as PNG, SVG, or JPEG with optional high-resolution output. All processing happens locally using JsBarcode — nothing is uploaded to any server.

Barcode Standard

CODE128 Content

High-density alphanumeric — the most versatile & widely used barcode standard

Shipping & logisticsRetail & inventoryHealthcare (GS1-128)Manufacturing

Example: ABC12345

Live Preview

Examples

Click an example to load its barcode type and content.

CODE128 — Product Code

CODE128||ABC12345

EAN-13 — Retail Product

EAN13||5901234123457

EAN-8 — Small Retail

EAN8||96385074

UPC-A — US Retail

UPCA||123456789012

UPC-E — Small Package

UPCE||123456

ITF-14 — Shipping Carton

ITF14||12345678901231

CODE39 — Inventory Item

CODE39||ABC-123

MSI — Inventory Control

MSI||1234567

Pharmacode — Pharma

pharmacode||12345

Codabar — Library Book

codabar||A123456B

How Barcodes Work

Barcodes are machine-readable representations of data that use parallel lines (bars) and spaces of varying widths to encode information. A barcode scanner shines a laser or LED light across the barcode and measures the reflected light — dark bars absorb light while white spaces reflect it. The pattern of reflections is decoded into the corresponding data based on the specific barcode symbology.

Optical Scanning

Barcode scanners use laser or camera-based readers to capture the pattern of bars and spaces. The width ratios between bars and spaces encode the data.

Check Digit Validation

Most retail barcodes (EAN-13, UPC-A, ITF-14) include a check digit — the last digit is calculated from the preceding digits using a mathematical formula. This ensures the barcode was scanned correctly.

Symbology Standards

Each barcode type follows a specific symbology — the encoding rules that define how data is represented. For example, CODE128 encodes each character with 11 modules of bars and spaces.

Privacy First

All barcode generation happens entirely in your browser using JsBarcode. Your data never leaves your device — no servers, no tracking, no uploads.

Instant Generation

Barcodes are generated in real time with zero server round trips. As you type and adjust settings, the barcode updates immediately with smooth transitions.

Print-Ready Output

Download high-resolution PNG, vector SVG, or JPEG output. SVG is perfect for professional printing and design work — scales to any size without quality loss.

Barcode Types Explained

Understanding the different barcode standards and when to use each one.

Retail Barcodes (EAN/UPC)

EAN-13, EAN-8, UPC-A, and UPC-E are the standard barcodes found on retail products worldwide. They encode a product's GTIN (Global Trade Item Number) and are scanned at checkout.

Logistics Barcodes (CODE128, ITF-14)

CODE128 and ITF-14 are used in shipping and warehousing. CODE128 is versatile and high-density, while ITF-14 is specifically for outer carton packaging with built-in bearer bars.

Specialty Barcodes (Pharmacode, Codabar)

Pharmacode is used for pharmaceutical tracking, Codabar for libraries and blood banks, and MSI for warehouse inventory. Each was designed for specific industry needs.

All 10 Standards

ForgePlug supports all major barcode standards: CODE128, CODE39, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, MSI, Pharmacode, and Codabar — covering everything from retail products to pharmaceutical tracking.

Barcode Best Practices

Follow these guidelines to ensure your barcodes scan reliably and work in production.

Choose the Right Standard

Select the barcode standard that matches your industry and use case. Use EAN/UPC for retail products sold in stores, CODE128 for shipping and logistics, ITF-14 for outer cartons, Pharmacode for pharmaceutical packaging, and Codabar for library or blood bank applications.

High Contrast

Always maintain high contrast between bars and background. Black bars on a white background are the most reliable combination. Avoid low-contrast color combinations that may cause scanning failures. Test your barcodes with multiple scanners before printing in production.

Quiet Zone (Margins)

Always include sufficient quiet zone (blank margin) around your barcode — typically at least 10× the bar width on each side. This helps scanners distinguish the barcode from surrounding content. Our generator includes configurable margin settings to ensure compliance.

Use Check Digits

For retail barcodes (EAN-13, EAN-8, UPC-A, UPC-B, ITF-14), ensure the check digit is correct. The check digit is calculated from the preceding digits and is used by scanners to verify accurate reading. Invalid check digits will cause scanning failures at the point of sale.

Common Barcode Mistakes

Avoid these common pitfalls when generating and using barcodes.

  • Using the wrong barcode type for your industry (e.g., using CODE39 when EAN-13 is required for retail)
  • Making barcodes too small — minimum recommended width is 1.5 inches for most applications
  • Insufficient quiet zone (margin) around the barcode — this causes scanning failures
  • Low contrast between bars and background — black on white is the most reliable combination
  • Not testing barcodes with multiple scanners before mass printing
  • Encoding invalid characters for the chosen symbology (e.g., letters in a numeric-only format)
  • Distorting barcode proportions by resizing without maintaining aspect ratio

Frequently Asked Questions

Everything you need to know about generating barcodes with ForgePlug

Are my barcodes generated on a server?
No. All barcode generation happens entirely in your browser using the JsBarcode library on the client side. Your data never leaves your device. This is a core privacy feature of ForgePlug — everything is local.
What barcode formats are supported?
ForgePlug's Barcode Generator supports 10 major barcode standards: CODE128 (high-density alphanumeric), CODE39 (variable alphanumeric), EAN-13 (13-digit retail), EAN-8 (8-digit small retail), UPC-A (12-digit US retail), UPC-E (6-digit compressed UPC), ITF-14 (14-digit shipping), MSI (variable numeric inventory), Pharmacode (pharmaceutical tracking), and Codabar (library & blood bank).
What is the difference between EAN-13 and UPC-A?
EAN-13 (13 digits) is the international retail standard used in Europe, Asia, Australia, and most countries outside North America. UPC-A (12 digits) is the standard used primarily in the United States and Canada. Both encode product information for point-of-sale scanning. EAN-8 is a compressed 8-digit version for small items.
When should I use CODE128 vs CODE39?
CODE128 is the most versatile and widely used barcode standard. It supports the full ASCII character set and offers the highest density — meaning shorter barcodes for the same data. Use CODE128 for shipping, logistics, and general-purpose needs. CODE39 is older and supports only uppercase letters, digits, and a few symbols, but remains common in government (LOGMARS), automotive (AIAG), and healthcare (HIBC) applications.
How do I customize the look of my barcode?
ForgePlug's Barcode Generator offers extensive customization options. You can adjust bar width (thickness), bar height, margin/padding, font size, font family (monospace, Arial, Helvetica, etc.), text position (top, bottom, or hidden), foreground and background colors. Toggle the human-readable text on/off and enable high-resolution mode for print. All changes are previewed in real time.
What download formats are available?
You can download your barcode as PNG (raster image with optional transparent background), SVG (vector format — perfect for printing and design work), JPEG (smaller file size), or PDF (print-ready A4 document). SVG is recommended for professional use as it scales to any size without quality loss.
Can I download my barcode as a PDF?
Yes. ForgePlug's Barcode Generator can create a print-ready PDF document with your barcode centered on an A4 page. The PDF is generated using pdf-lib entirely in your browser — the barcode image is embedded at optimal size within generous margins, and a label showing the barcode type and encoded value is included below the barcode. This is ideal for shipping labels, product packaging, inventory tags, and any other use case requiring a standard document for printing or sharing. Like all features, PDF generation happens locally — your data never leaves your device.
Can I use these barcodes commercially?
Yes. Barcodes generated with ForgePlug are free to use for any purpose, including commercial projects. There are no watermarks, logos, or restrictions. However, for retail use of EAN/UPC barcodes, you may need to purchase a company prefix from GS1 (the global standards organization). The barcode images themselves are royalty-free.
What is ITF-14 used for?
ITF-14 (Interleaved 2 of 5) is a 14-digit barcode standard used exclusively for shipping containers and outer packaging. It encodes the GTIN (Global Trade Item Number) of the product case or pallet. ITF-14 barcodes are typically printed on corrugated cardboard and are designed to be read by industrial-grade scanners in warehouses and distribution centers. They include bearer bars (a surrounding border) to protect the barcode.
What is Pharmacode used for?
Pharmacode (also known as Pharmaceutical Binary Code) is a barcode standard used specifically in the pharmaceutical industry for tamper-evident packaging tracking. It can represent numbers from 3 to 131,070. Unlike other barcodes, Pharmacode reads in only one direction and uses a unique binary encoding scheme. It is required by many regulatory authorities for pharmaceutical security.
What is Codabar used for?
Codabar (also known as Code 2 of 7) is an older barcode standard that encodes digits 0-9 and six special characters (- $ : / . +), with start/stop characters (A, B, C, or D). It's still widely used in libraries for book tracking, by blood banks (FDA requirement), in photofinishing labs, and on FedEx airbills. It's valued for its simplicity and reliability.
Can I print barcodes directly from ForgePlug?
Yes. You can print barcodes directly from the tool using the Print button, which opens your browser's print dialog for high-quality output. For best print results, use SVG format for truly scalable vector output, enable high-resolution mode, and ensure adequate contrast between foreground and background colors.
What are best practices for barcode printing?
For best scanning results: use high-contrast colors (black on white is most reliable), ensure bars are not too thin (width of 2-3px for most applications), maintain sufficient quiet zone margins (at least 10x the bar width on each side), test with multiple scanners before mass printing, and use SVG or high-resolution PNG output. Avoid printing barcodes smaller than 1.5 inches wide.
4.8 · Trusted by Developers

Frequently Asked Questions

Everything you need to know about generating barcodes

Are my barcodes generated on a server?
No. All barcode generation happens entirely in your browser using the JsBarcode library on the client side. Your data never leaves your device. This is a core privacy feature of ForgePlug — everything is local.
What barcode formats are supported?
ForgePlug's Barcode Generator supports 10 major barcode standards: CODE128 (high-density alphanumeric), CODE39 (variable alphanumeric), EAN-13 (13-digit retail), EAN-8 (8-digit small retail), UPC-A (12-digit US retail), UPC-E (6-digit compressed UPC), ITF-14 (14-digit shipping), MSI (variable numeric inventory), Pharmacode (pharmaceutical tracking), and Codabar (library & blood bank).
What is the difference between EAN-13 and UPC-A?
EAN-13 (13 digits) is the international retail standard used in Europe, Asia, Australia, and most countries outside North America. UPC-A (12 digits) is the standard used primarily in the United States and Canada. Both encode product information for point-of-sale scanning. EAN-8 is a compressed 8-digit version for small items.
When should I use CODE128 vs CODE39?
CODE128 is the most versatile and widely used barcode standard. It supports the full ASCII character set and offers the highest density — meaning shorter barcodes for the same data. Use CODE128 for shipping, logistics, and general-purpose needs. CODE39 is older and supports only uppercase letters, digits, and a few symbols, but remains common in government (LOGMARS), automotive (AIAG), and healthcare (HIBC) applications.
How do I customize the look of my barcode?
ForgePlug's Barcode Generator offers extensive customization options. You can adjust bar width (thickness), bar height, margin/padding, font size, font family (monospace, Arial, Helvetica, etc.), text position (top, bottom, or hidden), foreground and background colors. Toggle the human-readable text on/off and enable high-resolution mode for print. All changes are previewed in real time.
What download formats are available?
You can download your barcode as PNG (raster image with optional transparent background), SVG (vector format — perfect for printing and design work), JPEG (smaller file size), or PDF (print-ready A4 document). SVG is recommended for professional use as it scales to any size without quality loss.
Can I download my barcode as a PDF?
Yes. ForgePlug's Barcode Generator can create a print-ready PDF document with your barcode centered on an A4 page. The PDF is generated using pdf-lib entirely in your browser — the barcode image is embedded at optimal size within generous margins, and a label showing the barcode type and encoded value is included below the barcode. This is ideal for shipping labels, product packaging, inventory tags, and any other use case requiring a standard document for printing or sharing. Like all features, PDF generation happens locally — your data never leaves your device.
Can I use these barcodes commercially?
Yes. Barcodes generated with ForgePlug are free to use for any purpose, including commercial projects. There are no watermarks, logos, or restrictions. However, for retail use of EAN/UPC barcodes, you may need to purchase a company prefix from GS1 (the global standards organization). The barcode images themselves are royalty-free.
What is ITF-14 used for?
ITF-14 (Interleaved 2 of 5) is a 14-digit barcode standard used exclusively for shipping containers and outer packaging. It encodes the GTIN (Global Trade Item Number) of the product case or pallet. ITF-14 barcodes are typically printed on corrugated cardboard and are designed to be read by industrial-grade scanners in warehouses and distribution centers. They include bearer bars (a surrounding border) to protect the barcode.
What is Pharmacode used for?
Pharmacode (also known as Pharmaceutical Binary Code) is a barcode standard used specifically in the pharmaceutical industry for tamper-evident packaging tracking. It can represent numbers from 3 to 131,070. Unlike other barcodes, Pharmacode reads in only one direction and uses a unique binary encoding scheme. It is required by many regulatory authorities for pharmaceutical security.
What is Codabar used for?
Codabar (also known as Code 2 of 7) is an older barcode standard that encodes digits 0-9 and six special characters (- $ : / . +), with start/stop characters (A, B, C, or D). It's still widely used in libraries for book tracking, by blood banks (FDA requirement), in photofinishing labs, and on FedEx airbills. It's valued for its simplicity and reliability.
Can I print barcodes directly from ForgePlug?
Yes. You can print barcodes directly from the tool using the Print button, which opens your browser's print dialog for high-quality output. For best print results, use SVG format for truly scalable vector output, enable high-resolution mode, and ensure adequate contrast between foreground and background colors.
What are best practices for barcode printing?
For best scanning results: use high-contrast colors (black on white is most reliable), ensure bars are not too thin (width of 2-3px for most applications), maintain sufficient quiet zone margins (at least 10x the bar width on each side), test with multiple scanners before mass printing, and use SVG or high-resolution PNG output. Avoid printing barcodes smaller than 1.5 inches wide.

Share this tool

Share
Runs in your browser100% privateNo data uploaded