Subscribe - It's FREE!!

Stay Connected Here

Stay Updated With Us Here


How to generate barcode using jQuery (ean8, ean13, code11, code39, code128, codabar and more)

Share with WhatsApp

This post covers information about how you can create or generate barcode using jQuery.

jQuery barcode plugin is a simple and lightweight jQuery plugin authored by Demonte Jean-Baptiste and Hourez Jonathen ( BarCode Coder Library )and available for all under dual license (cecill and gnu)

Using this plugin is very simple. Let’s start step by step.

Plugin is a jQuery plugin so it’s obvious that you will required to include jQuery js to use this plugin. With jQuery you need to include plugin’s js file too like following.

<script src=""></script>

<script type="text/javascript" src="jquery-barcode.js"></script>

Once you include above js then you are ready to generate barcode.

You just need to call barocode function on the target div or input which takes parameters as string to generate barcode and barcode type like below.


That’s it. You will see a generated barcode in div.

This plugin supports multiple types which are listed below.

  • codabar
  • code11 (code 11)
  • code39 (code 39)
  • code93 (code 93)
  • code128 (code 128)
  • ean8 (ean 8)
  • ean13 (ean 13)
  • std25 (standard 2 of 5 - industrial 2 of 5)
  • int25 (interleaved 2 of 5)
  • msi
  • datamatrix (ASCII + extended)

Plugin is able to generate barcode in 4 output types which are as follows.

  • CSS
  • BMP (not works in IE)
  • SVG (not works in IE)
  • CANVAS (works only with canvas supported browsers)

Below is the live fiddle showing usage of this plugin.

Hope you have benefitted from this post. Try this plugin and do share your thoughts. Also if you are having something to add this post positively do share that too. Thanks.

To know more about this plugin you can visit its official site here.

If you enjoyed this post take 5 seconds to share it! Be Socialable. :-)

Share with WhatsApp

Posts To Read Next

Typewriter - Automatic TypeScript Template generation from C# classes in Visual Studio

Typewriter, an extension for visual studio that generates TypeScript files from C# code files using TypeScript templates. Convert your C# model classes to TypeScript automatically.

How to call click or any event only once in jQuery

Know how to execute an click event or any event only once for any element in jQuery. Perform action only once and even not required to unbind event.

Top 10 Visual Studio things which can boost developers coding speed

Visual Studio 2012 provides some coding features by which you can code faster if use them properly. This post will cover top 10 things among them to boost your development speed.

Copy changed data in table from one database to another in SQL stored procedure

How to copy or merge changed data in table from one database to another having same schema is the topic of this post.

Swagger - Powerful Opensource Framework for RESTful API

With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability. Swagger Editor allows you to generate code, documentation with ease.

Your opinion is valuable for us! Comments, suggetions are welcome.

Submit your Email Id to stay updated with us and get notified with our new posts. It's FREE!
Vu 32'' TV Vu 24'' TV
We know this popup is disturbing you!
But We would greatly appreciate if you share us with your friends below!

It will not take more than 2 seconds but will motivate us greatly to write more,share more!