Description
Barcodegen adds real barcodes to WordPress. Type a value, pick a format, and you get a clean vector barcode that prints sharply at any size — product pages, packing slips, invoices, tickets, shelf labels, asset tags, anything.
Six formats, generated locally
- EAN-13 — retail products worldwide (12 or 13 digits, check digit calculated for you)
- EAN-8 — small retail packages
- UPC-A — retail products in the US and Canada
- Code 128 — the all purpose format for internal codes, tickets and documents, with automatic code set selection (A/B/C) and the correct check digit
- Code 39 — still common on older industrial equipment
- ITF-14 — cartons and shipping labels, with the GTIN-14 check digit
How it renders
Every barcode is written as inline SVG by PHP. There is no image file to manage, no JavaScript, and no canvas: the bars stay sharp on retina screens and come out of a laser printer perfectly. Guard bars extend below the digit row and the number system digits sit in the quiet zones, so EAN-13 and UPC-A output looks like a real retail label, not a screenshot.
Three ways to add one
- The [barcodegen] shortcode, with attributes for every option.
- The Barcode block, with a live preview in the editor.
- Tools Barcode Generator in your dashboard, which also hands you a ready made shortcode.
Privacy and performance
Nothing is sent anywhere. There are no external requests, no trackers, no cookies and no third party libraries — the encoders are about a thousand lines of PHP written for this plugin. Barcodes render on the server, so they work in feeds and emails and add nothing to your page weight budget.
Shortcode
[barcodegen format="ean13" value="5901234123457"]
Every attribute is optional except the value:
- format — code128 (default), code39, ean13, ean8, upca or itf14. The advanced values code128a, code128b, code128c and itf are accepted too
- scale — module width in pixels, 0.5 to 10 (default 2)
- height — bar height in pixels (default 60)
- text — print the value under the bars, “yes” or “no”
- bar_color — any CSS colour, default #000000
- bg_color — any CSS colour, or “transparent”
- padding — extra space around the bars, in pixels
- class — extra CSS class on the SVG
- align — left, center or right
Enclosed content also works, which is handy when the value contains quotes:
[barcodegen format="code39"]HELLO WORLD[/barcodegen]
If a value cannot be encoded — a five digit EAN-13, a lower case letter in Code 39 — you will see the reason while editing and visitors will see nothing at all.
Formats
What each format accepts, so you get it right the first time.
- code128 — ASCII 0-127, any length. The check digit is calculated for you. The default, and the best choice for internal codes.
- code39 — digits, A-Z and – . space $ / + %. Lower case is converted to upper case for you.
- ean13 — 12 digits, or 13 with the check digit. A wrong check digit is corrected rather than printed.
- ean8 — 7 digits, or 8 with the check digit.
- upca — 11 digits, or 12 with the check digit.
- itf14 — 13 digits, or 14 with the check digit. Cartons and shipping labels.
Non-digit characters are stripped from EAN, UPC and ITF values, so 590-1234-123457 encodes exactly like 5901234123457. Values with accents or non-Latin characters are rejected by Code 128 and accepted by Code 39 only if they are in the Latin-1 range.
Blocks
This plugin provides 1 block.
- Barcode
Installation
- In your dashboard go to Plugins Add New and search for “Barcodegen”.
- Click Install Now, then Activate.
- Open Tools Barcode Generator to make your first barcode, or paste
[barcodegen format="ean13" value="5901234123457"]into any post.
FAQ
-
Does it send my data anywhere?
-
No. Encoding happens in PHP on your own server. The plugin makes no HTTP requests at all, so it is safe to use behind a firewall and it cannot leak product codes.
-
Can I print the barcodes?
-
Yes. The output is vector SVG, so it stays sharp at any size and prints cleanly on labels, packing slips and thermal printers.
-
Does it work with WooCommerce?
-
Yes. Put the shortcode in a product description, or print barcodes on order emails and invoices with the same shortcode.
-
Can I remove the link back to barcodegen.net?
-
It is already removed: the plugin adds no visible link by default. If you would like to credit the plugin there is an opt-in switch on the settings screen.
-
Why is there no QR Code?
-
QR, Data Matrix, PDF417 and Aztec are 2D formats that need a very different encoder, and they are on the roadmap. Until then barcodegen.net generates them for free in the browser, along with bulk CSV generation and ZIP export.
-
Which format should I use?
-
Code 128 for anything internal — SKUs, order numbers, tickets, asset tags. EAN-13 for products sold worldwide, UPC-A for the US and Canada, EAN-8 when a small package has no room for thirteen digits, ITF-14 for shipping cartons. If a shop scanner has to read it, use EAN-13 or UPC-A. If it is only for your own tracking, Code 128 is narrower and scans just as reliably.
-
My printed barcode will not scan. Why?
-
Nine times out of ten it is print scaling. Print at 100%, never “Fit to page”. If that does not fix it, raise scale to 2 or more, make sure the quiet zone around the bars is not cropped, and keep the bars black on white — red, light or low contrast bars will not read.
-
Do I need to calculate the check digit?
-
No. Supply 12 digits for an EAN-13, 11 for a UPC-A, 7 for an EAN-8 or 13 for an ITF-14 and the check digit is added for you. If you supply the full length with a wrong check digit it is corrected rather than printed, so you cannot publish a symbol that scanners reject.
-
Does it work with page builders?
-
Yes. The Barcode block is a normal Gutenberg block and the shortcode is a normal shortcode, so both work in Elementor, Divi, WPBakery, Beaver Builder and the Classic Editor with no extra setup.
-
My barcode does not appear. What now?
-
While you are logged in as an editor the plugin prints the exact reason — usually a value that is too short for the format. Check the format hint on the generator screen for the accepted length.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Barcodegen – Barcode Generator” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Barcodegen – Barcode Generator” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- Initial release. EAN-13, EAN-8, UPC-A, Code 128 (auto, A, B, C), Code 39 and ITF-14, shortcode, block and dashboard generator.