# Barcode generator

Barcodes of 18 types, one or a whole batch, on printable labels with a title, price and logo; download PNG, JPEG, WebP, SVG, PDF, HTML or ZIP, or print.

- Open the app: https://openlibs.dev/en/app/barcode-generator/
- library for developers: https://openlibs.dev/en/lib/barcode-generator/

## Barcode generator: instructions

### Getting started

The preview is on the right (on top on a phone) and redraws at once; the settings cards are on the left (below on a phone). Choose the barcode type, type the data, style the code, then open “Export” in the toolbar to download, print or copy it. Click the preview to see it enlarged.

### Barcode types and data

Not sure which type to take? CODE 128 accepts any text. EAN and UPC are retail codes: the last check digit is added for you. The hint under the type says what the data must be; when the type changes, a fitting example is filled in. A green “Valid” badge means the data fits the type.

### Batch, auto-numbering and CSV

On the “Batch” tab enter one value per line (up to 200) and choose the number of columns; invalid values are marked in red. Auto-numbering builds a list such as SKU-0001, SKU-0002… from a prefix, start, count, step, number of digits and suffix. The CSV buttons load the first column of a CSV or TXT file and save the list as CSV.

### Look of the code

Set the line width and height, the line and background colors (a color button or an ImageMagick color name), a transparent background, the size of the text under the code, the margin around it and whether the text is shown. A warning appears when lines and background have too little contrast to scan.

### Backdrop and white card

A backdrop turns the code into a 600 × 360 label: pick one of 20 ready designs or upload your own picture. The white card under the code keeps the quiet zone, so it scans on any background; set its corner radius, padding and border.

### Label: title, font, price and logo

The title over the code uses the site's text and font block: type it, choose a font (or upload your own) and bold or italic. The price or caption goes under the code, the logo above it. With any of them the code is placed on a white card.

### Print and PDF size

Choose a roll label size (58 × 40, 40 × 30, 30 × 20 mm) or an A4 sheet layout (3 × 8, 4 × 10, 2 × 7, 5 × 13). Without a preset, print and PDF follow the number of columns. Printing is always on white for reliable scanning.

### Export, print and copy

In “Export” download PNG, JPEG, WebP or SVG (the codes of a batch come in one ZIP), a PDF page, an HTML page or a ZIP of PNG files; print; or copy a PNG image, SVG code, a data URL or an HTML img tag.

### Undo, journal and projects

Undo and Redo roll every change back and forward; the Journal lists actions and errors. “Save project” in Export keeps all settings with the backdrop and logo; “Import” loads it back, and “Restore unsaved work” there brings back what the browser saved automatically. Ctrl+Z / Ctrl+Y undo and redo, Ctrl+S opens Export, Ctrl+P prints.

