Add the self-hosted script
Use the SmartGen domain file in the client’s admin dashboard or copy barcode-service.js into the client’s own repository. No external service is called by the tool.
100% browser-side barcode tool
Generate and validate product barcodes directly in the browser. This page uses self-hosted code from your SmartGen repository—no database, analytics request, API key, or external barcode service.
$10 lifetime serviceCore tool first. Checkout and activation are not enabled yet.
Self-hosted generator
Choose a standard, enter the product value, and download a sharp local SVG. Retail identifiers are checksum-validated before the barcode can be generated.
Code 128 accepts readable product, stock, and inventory values.
This barcode is generated in your browser. The product value does not leave this page.
Client-admin dashboard integration
Load one self-hosted JavaScript file in the client’s admin dashboard. The integration normalizes retail check digits, prevents invalid form submission, and raises a local event with the valid barcode. The client’s own backend remains responsible for its product database.
<script src="https://smartgentools.com/barcode-service/barcode-service.js"></script>
<script>
SmartGenBarcode.attachProductForm({
form: "#client-product-form",
barcodeInput: "#product-barcode",
formatInput: "#barcode-format",
onValid: ({ barcode, format }) => {
// Send only to the client’s own backend.
// Never place a real API key in this browser code.
document.querySelector("#product-barcode").value = barcode;
}
});
</script>Use the SmartGen domain file in the client’s admin dashboard or copy barcode-service.js into the client’s own repository. No external service is called by the tool.
Provide selectors for the client’s product form, barcode input, and format input. The integration validates values on entry and prevents the form from saving an invalid barcode.
Let the client’s backend use its own session, CSRF protection, and server-side credentials when it saves the product. The browser plugin never needs the secret key.
| Format | Accepted product input | Browser action |
|---|---|---|
| EAN-13 | 12 digits or valid 13-digit identifier | Calculates or verifies the check digit |
| UPC-A | 11 digits or valid 12-digit identifier | Calculates or verifies the check digit |
| Code 128 | 1–80 printable characters | Generates an inventory barcode locally |
| Code 39 | Uppercase letters, numbers, spaces, and approved symbols | Blocks unsupported characters before save |