Barcode Server

Fill in the field below with a 7-, 8-, 12- or 13-digit number for a barcode, y'know, like the ones you see on food, CDs, and books. If you want to have the server generate a checksum for you, then just replace the last digit with a question mark ("?"). By the way, those digits you sometimes see to the left or the right of the barcodes are typically part of the number encoded in the bars. And, please note, the barcodes that you can generate here must consist only of digits (not letters or punctuation).

Enter value to encode:

There are more options available on the advanced options page. Joe-Bob says check it out.

Read Me First!

Unfortunately, the Barcode Server doesn't work as well as it used to. This isn't because the server changed, but because the web changed around it. The server produces what used to be the most widely recognized image format on the web, called "XBM." However, none of the most recent versions of any the major web browsers support this format anymore, for reasons that elude me.

You can still save the image (which will look "broken" on your browser), and there's a good chance you can double-click the result to see it, but that's not the best solution in the world. At some point, I expect I will finally get a chance to revamp the server, but I do have a day job that takes up the vast majority of my computer-facing time, which means I can't really make a firm commitment.

Inspiration and History

This toy was inspired by the October 2, 1994 edition of You Can With Beakman and Jax, which featured an excellent description of how UPC barcodes work. Running near-continuously since that fateful day in the fall of 1994, this was the first barcode generating site on the web, and was also one of the first public websites (if not the first such website) to serve instantly-generated images. At first, the server only did the original UPC-A form (the most common product barcode type in the USA), but in the spring of 2001, improvements were made so that now the server can produce pretty much any commonly-used UPC or EAN barcode.

It's Not Begging, Really

If you've found the Barcode Server site to be useful, then I'd appreciate it if you gave me a token donation via PayPal ($2, $5, $11).

Official Barcode Numbers

Sometimes people end up here because they're trying to find out how to get a UPC code assigned for a product they wish to sell. In the USA, at least, the Uniform Code Council does that. Once you have a number for your product, feel free to come back here to look at the barcode associated with that number, and save it, or print it, or what have you.

The previous paragraph isn't enough for some people. This link provides a more detailed explanation.

If you're trying to encode the ISBN numbers that are found on books, magazines, and other media, then the ISBN page may have the information you require.

If you've tried to use a saved image and are having trouble, then this page may be of help to you.

The Devil's In The Details...Not!

One thing that people like to ask a lot is what the "meaning" is of the little marks to the left and right and smack dab in the middle of the code. On either side is a pair of thin dark bars separated by a thin light bar, and in the middle, there's always the pattern light-dark-light-dark-light. These are not in fact representations of a digit, but are rather merely synchronization marks (sometimes called "guard bars") that help barcode-reading equipment recognize that it is in fact looking at a barcode and help it determine the width of a mark (since barcodes come in different sizes and the distance of the code from the equipment optics can affect the readings as well). On the right-hand-side of a barcode (but not on the left), the digit "6" is represented by something that does bear a resemblence to the synch marks, and this has occasionally led "antichrist hunters" to exclaim that all barcodes contain embedded within them "the number of the beast" (that is, "666").

Left and Right Synch Marks Middle Synch Mark Right Digit 6 Left Digit 6
1 0 1
0 1 0 1 0
1 0 1 0 0 0 0
0 1 0 1 1 1 1

That claim holds about as much water as saying the word "giggle" has the mark of the beast because it looks like it has three "6"s in it if you turn it upside down (if you draw your "g"s like upside down "6"s).

But just to re-fog things back up a bit: While the particular choice for synch marks makes a lot of sense from an engineering standpoint, there's no obvious reason that the particular representation for the digit "6" was chosen, and it is conceivably possible — but arguably extremely unlikely — that someone, some group of people, or even some sinister force (such as one of the devil's minions looking to get a big bonus that month) influenced the standards process so as to make the representation for "6" look as much like the synch marks as possible. But that doesn't change the fact that the synch marks themselves are not in fact representations of actual numerical quantities. Of course, if you care about this for anything more than cocktail party conversation, you should consult with your personal religious authority for the final word on the matter.

Technical Information / Commercial Reuse / Linking

For the technically inclined, you can check out the source code (.tar.gz or .zip format), and you can even use it if you want to, but you must abide by the terms given in the header comment. In particular, you can only use it for free for non-commercial purposes, and if you use the source code on your site, you must give me credit and mail me to let me know that you are using it (and give me a URL to check out!). If your usage is inspired (there are several very uninspired duplicates or even plagiaries of this site), I may decide to link to it from here.

Do not link to this site or to the embedded barcode generator CGI for any commercial purpose whatsoever. This site is run in good faith as a free resource for the technically curious and those in need of a quickie one-off generated barcode, not as something to be taken advantage of on a regular basis by commercial operations. For non-commercial purposes it is okay to link to this page, but it is not okay to code a direct link to the embedded barcode generator CGI. Please contact me if you are unclear about this.

I don't have the time or resources to offer free support for the code, so please don't ask. However, I would be happy to sell you a very reasonably-priced unlimited right to use (but not resell) the code for commercial purposes. The code is very easy to use (but don't just take my word for it; you can see for yourself by checking out the links two paragraphs up), and by paying, you won't have to lie awake at night, wracked with guilt about taking advantage of an honest programmer.

Good & Fun Non-Commercial Uses

Someone finally did something fun with this code: Rob Carlson is using it to reproduce grocery store "bonus" cards in an effort to undermine yet another corporation who wants to know too much information about you.

This didn't use my code, but it's worth pointing at because it's really nifty: Scott Blake's Bar Code Art

One Final Word


The Barcode Server
Copyright © 1994–2020 Dan Bornstein. All rights reserved.