Barcode Generator
Create CODE128, EAN13, UPC and CODE39 barcodes in your browser and download them as PNG or SVG.
Loading Barcode Generator… If nothing happens, please enable JavaScript.
A barcode is a machine-readable representation of data encoded as a pattern of parallel lines of varying widths and spacings. When a scanner shines light across the pattern, the alternating dark bars and light gaps reflect differently, and the scanner translates that sequence back into the original digits or characters. This humble one-dimensional symbol underpins almost the entire modern retail and logistics economy: nearly every packaged product on a shop shelf, every parcel moving through a courier network, and every book in a library carries a barcode that lets a computer identify it in a fraction of a second without manual typing.
Frequently asked questions
Is the value I enter sent to a server?
What is the difference between the supported formats?
Why am I getting an error for EAN13 or UPC?
Should I download PNG or SVG?
What is a check digit and is it added automatically?
Can I create a barcode that contains letters?
Why will my printed barcode not scan?
Is a barcode the same as a QR code?
About Barcode Generator
There are many barcode standards, each suited to a different job, and this generator supports four of the most widely used. CODE128 is a high-density, general-purpose format that can encode the full set of ASCII characters, making it the workhorse for shipping labels, inventory tags, and internal tracking. EAN13 (European Article Number) is the thirteen-digit retail standard used on consumer products across most of the world. UPC (Universal Product Code) is the twelve-digit North American retail standard you see on groceries and packaged goods. CODE39 is an older, robust format that encodes digits, uppercase letters, and a handful of symbols, and it remains common in industrial, automotive, and defence applications because it is simple and forgiving.
This tool generates barcodes entirely in your browser using a JavaScript barcode library. You type a value, choose a format, and the barcode is drawn instantly into a vector image on the page. If the value you enter is not valid for the chosen format, for example too few digits for EAN13 or an unsupported character for CODE39, the tool catches the error and shows a clear message instead of producing a broken or unscannable symbol. Nothing you type is sent to any server; the value, the rendering, and the downloads all happen locally on your device, and the page keeps working offline once it has loaded.
You can download the result in two formats. The PNG option rasterizes the barcode to a pixel image suitable for embedding in documents, emails, presentations, and most label-printing software. The SVG option produces a vector file that stays perfectly sharp at any size, which is the better choice for professional printing where crisp, high-contrast bars are essential for reliable scanning. Whichever you choose, keep the barcode large enough and the contrast high enough that a scanner can read it: shrinking a barcode too far, printing it on a textured surface, or reducing the contrast between bars and background are the most common reasons a barcode fails to scan.
A Patent Drawn in the Sand: The Invention of the Barcode
The barcode began with a question overheard in a hallway. In 1948, a supermarket executive in Philadelphia visited the Drexel Institute of Technology asking whether anyone could devise a way to automatically read product information at the checkout. Graduate student Bernard Silver mentioned it to his friend Norman Joseph Woodland, who became fascinated by the problem. The story goes that Woodland, while sitting on a Florida beach thinking it over, drew Morse code dots and dashes in the sand and then pulled his fingers down through them, turning the dots and dashes into thin and thick vertical lines. That moment of insight, extending Morse code into a pattern of parallel bars, was the conceptual birth of the barcode. Woodland and Silver filed their patent in 1949 and received it in 1952, though their original design was a circular bullseye pattern rather than the linear stripes we know today.
The idea was decades ahead of the technology needed to use it cheaply. Reliable, affordable scanning had to wait for the laser and for the integrated circuits that could decode a signal in real time. The breakthrough into everyday life came in 1973, when a committee of grocery industry leaders selected the Universal Product Code, designed largely by IBM engineer George Laurer, as the standard. The very first product ever scanned at a retail checkout using a UPC barcode was a pack of Wrigley's chewing gum, rung up at a Marsh supermarket in Troy, Ohio, on 26 June 1974. That pack of gum is now preserved in the Smithsonian Institution as a small monument to a technology that would reshape global commerce.
From that single pack of gum, the barcode spread to become one of the most ubiquitous technologies on Earth, with billions of scans performed every single day across retail, warehousing, healthcare, transport, and manufacturing. Its descendants and relatives multiplied too: CODE39 and CODE128 arrived to handle letters and dense data for industry and logistics, and the two-dimensional QR code later extended the same basic idea, machine-readable patterns that bridge the physical and digital worlds, into a far higher-capacity grid. Yet the original linear barcode endures largely unchanged, a testament to how a simple, robust design sketched in beach sand could quietly underpin the flow of goods around the planet.