Project Nayuki

1D barcode generator (JavaScript)





This JavaScript program generates 1D (linear) barcodes for numerous standards. Note that some schemes have limitations, such as only encoding numbers, supporting a limited character set, or restricting lengths. You can save the generated barcode image by right-clicking on it.

The UPC and EAN schemes show the trailing check digit to the human. If you create the barcode in raw mode you can set the check digit to any value – but scanners will ignore barcodes with an incorrect check digit. Thus for convenience, you should use the program to automatically compute the check digit. Either way, the check digit cannot be used to store extra useful information, because its value is determined by all the preceding digits.

Use this barcode generator at your own risk. The source code is available for viewing. This program is complex and not easy to verify, thus Nayuki does not provide warranty or compensation for incorrectly generated barcodes. If you do discover a problem, contact me so I can investigate and fix it for future users.

More information about the implemented barcode standards is available on Wikipedia: Codabar, Code 39, Code 93, Code 128, International Article Number (EAN), EAN-8, Interleaved 2 of 5, Universal Product Code.