JsBarcode renders many linear barcode formats to canvas or SVG in browsers or Node.js. Per-format minified bundles are available, and options control size, colors, and text labels.
Overview
JsBarcode generates barcodes in JavaScript without mandatory third-party dependencies in the browser. Supported symbologies include CODE128, EAN and UPC family codes, CODE39, ITF, MSI, Pharmacode, Codabar, and CODE93.
You can render to a canvas or image element, pass options for dimensions and display text, or read structured data objects for custom rendering. HTML data attributes on elements let you declare values and options before initializing the library.
The project publishes full and per-format minified files on a CDN, and installs through npm or Bower. Node.js usage shares the same API for server-side label generation.
A CodePen demo and wiki examples illustrate browser setup and advanced option combinations.
Key features
- Multiple 1D barcode symbologies
- Canvas and image element rendering
- Optional jQuery integration in browsers
- Per-format minified CDN bundles
- npm and Bower installation
- Configurable width, height, and labels
Use cases
- Print product labels in a web app
- Generate barcodes server-side with Node
- Embed scannable codes on invoices or tickets