Your barcode data is processed locally in your browser.
Supports a broad range of characters (printable ASCII). Code 128 is a versatile barcode format commonly used for general-purpose identification.
Code 128: Printable ASCII text.
Enter a barcode value.
Customization
Defaults keep a dark barcode, light background, and a quiet zone for scanning. Extreme settings are limited.
Barcode Preview
Check the symbol on screen before you download or print.
Customization
Defaults keep a dark barcode, light background, and a quiet zone for scanning. Extreme settings are limited.
Download
PNG for screens and sharing. SVG for print. Files are created in this browser — nothing is uploaded.
Barcode Generator
Toolshelf is a barcode generator for Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF, ITF-14, and Codabar. Choose a format, enter a valid value, and download PNG or SVG without leaving this page. Encoding uses a local JavaScript library — not a barcode API and not a server render.
Your barcode data is processed locally in your browser. Nothing is uploaded to our server. Refreshing the page clears the form; values are not saved to localStorage.
What you can do with this barcode tool
- Generate Code 128, Code 39, EAN-13, EAN-8, UPC-A, ITF, ITF-14, and Codabar in the browser
- Live preview that updates as you type valid data
- Format-specific validation, including checksum checks where those formats use them
- Width, height, bar width, margin, colors, and human-readable text
- Download PNG or SVG, copy the barcode, or print a barcode-only sheet
- Contrast warning when colors may be hard to scan
- Private by design: barcode values are not uploaded or saved
- No signup required
What Is a Barcode?
A barcode is a visual encoding of a short piece of data, usually an identifier. Linear (1D) barcodes use bars of varying width. A compatible scanner turns that pattern back into the original characters. The printed image does not need a network connection to decode; the data is in the pattern itself.
Barcode Types
This generator implements the formats below. Each type has its own alphabet and, for retail-style numbers, a check digit.
- Code 128 — printable ASCII for general-purpose IDs and labels.
- Code 39 — uppercase letters, digits, and a few symbols.
- EAN-13 — 13 digits including a checksum.
- EAN-8 — 8 digits including a checksum.
- UPC-A — 12 digits including a checksum.
- ITF — digits in even-length pairs (Interleaved 2 of 5).
- ITF-14 — 14 digits including a GS1-style check digit.
- Codabar — digits and a small set of symbols, with optional A–D start/stop letters.
Code 128 vs Code 39
Code 128 encodes a wider ASCII set, including lowercase letters, and is typically more compact for the same data. Code 39 is simpler: uppercase A–Z, 0–9, space, and - . $ / + %. If your warehouse scanners or software already expect Code 39, stay with Code 39. For most new internal labels, Code 128 is the more flexible default.
EAN-13 vs UPC-A
Both are numeric retail-style codes with a check digit. EAN-13 has 13 digits; UPC-A has 12. They are related encodings, not identical file formats. A number that is valid as UPC-A is not automatically the same as an EAN-13 string unless you understand how the extra digit is used. This tool validates each format separately and does not convert between them.
How to Create a Barcode
- 1Choose the barcode format that matches your data and scanners.
- 2Enter the value. Invalid input is not turned into a misleading barcode. For EAN, UPC, and ITF-14 you can optionally apply a calculated check digit.
- 3Keep a dark barcode on a light background and leave the margin (quiet zone) intact.
- 4Download PNG or SVG, or print the barcode sheet. Scan a test print before you produce labels at scale.
How to Scan a Barcode
Dedicated barcode scanners (handheld USB or Bluetooth devices) usually expect a specific 1D format. Phone cameras vary: many unlock QR codes easily, while 1D barcodes may need a barcode scanning app that supports Code 128, EAN, or UPC. Hold the camera steady, keep the quiet zone visible, and confirm the decoded value matches what you typed.
Manual check: generate the barcode, download it, open it on a phone or computer, scan with a compatible scanner, and verify the decoded value. This page does not claim that every device was tested during development.
Barcode vs QR Code
Use a 1D barcode when you need a compact identifier on a product label, shelf tag, or warehouse tote and your scanners already read that symbology. Use a QR code when you want to share a URL, Wi-Fi network, or longer text. Generating both kinds of codes on Toolshelf stays in the browser.
Can I Use a Barcode for My Product?
You can generate a visually valid barcode from a number or string you already have. Selling products in retail often requires identifiers issued or licensed through the relevant standards and numbering organizations (for example GS1 GTINs). This tool does not register products, issue company prefixes, or confirm that a number is unique in the marketplace. Treat sample values as examples, not as real commercial product codes.
Privacy
Barcode values stay in page memory. They are not written to localStorage, not placed in the page URL, and not sent to analytics as tool input. Downloads use the browser’s Blob API.
Limitations
This is a single-symbol 1D barcode maker. It does not scan barcodes with the camera or generate QR codes. For CSV lists, use the Bulk Barcode Generator. Code 128 here is printable ASCII, not Unicode. Check digits are validated and can be applied only when you click the check-digit control. Decorative colors with poor contrast can reduce scan success.
Frequently asked questions
- What is a barcode?
- A barcode is a machine-readable pattern of bars and spaces that stores a short string, usually an identifier. A scanner or compatible phone app reads the pattern and returns that value. This page generates 1D (linear) barcodes.
- What is Code 128?
- Code 128 is a compact 1D barcode that can encode printable ASCII characters. It is a common choice for internal IDs, inventory labels, and general-purpose identification. This generator defaults to Code 128.
- What is EAN-13?
- EAN-13 is a 13-digit numeric barcode with a check digit. Retail products often use EAN-13, but drawing a valid-looking symbol is not the same as obtaining a registered product number from the relevant numbering organization.
- What is UPC-A?
- UPC-A is a 12-digit numeric barcode with a check digit, widely associated with North American retail packaging. It is closely related to EAN-13. This tool validates the check digit and does not invent a commercial GTIN for you.
- Can I generate a barcode without signing up?
- Yes. Toolshelf Barcode Generator runs in your browser. There is no account and no upload of the value you encode.
- Can I download a barcode as PNG?
- Yes. Download PNG creates a raster image in the browser from the generated barcode, not a screenshot of the page. The file name is toolshelf-barcode.png.
- Can I download a barcode as SVG?
- Yes. SVG is generated from the same barcode and stays sharp for print. The file name is toolshelf-barcode.svg.
- Can I print the barcode?
- Yes. Print Barcode opens a print layout that includes the barcode, the encoded value, and the barcode type. It does not print the rest of the ToolShelf page.
- What is the difference between a barcode and a QR code?
- A 1D barcode typically stores a short identifier in a line of bars. A QR code is a 2D matrix that can hold longer payloads such as URLs, Wi-Fi details, or contact data. Use a barcode when you need a compact ID for labels or scanners that expect Code 128, EAN, or UPC. Use a QR code when you need a URL or richer content.
- Which barcode format should I use?
- Use Code 128 for general text and internal IDs. Use Code 39 if you need a simple uppercase alphanumeric code. Use EAN-13, EAN-8, or UPC-A only when you already have a valid numeric code for that format. Use ITF or ITF-14 for numeric carton-style codes. Codabar is a small numeric/symbol set sometimes used in libraries and logistics. Match the format your scanner and process already expect.
- Can I generate a barcode from text?
- Yes, for Code 128 (printable ASCII) and Code 39 (uppercase letters, digits, and a small symbol set). EAN, UPC, and ITF formats require digits. Unicode text is not encoded in these 1D formats; use the QR Code Generator for URLs and multilingual text.
- Can I generate multiple barcodes?
- Yes. This page generates one barcode at a time. To create many barcodes from a CSV, use the Bulk Barcode Generator, which validates rows and can download a ZIP or print A4 labels in the browser.
Related tools
Continue with related browser-based tools on Toolshelf.
- Bulk Barcode Generator — Generate hundreds or thousands of barcodes from a CSV in your browser.
- QR Code Generator — Create QR codes for URLs, text, Wi-Fi, contacts, email, phone numbers and more.
- UUID Generator — Online UUID generator and validator.
- JSON to CSV Converter — Online JSON to CSV converter.
Ready to create a barcode?
Scroll up, encode your value locally, and download PNG or SVG.
Back to generatorWhat would you like to do next?
Continue working with the next step in this workflow. Recently used tools in this set are listed first.
- Bulk Barcode Generator — Generate hundreds or thousands of barcodes from a CSV in your browser.
- QR Code Generator — Create QR codes for URLs, text, Wi-Fi, contacts, email, phone numbers and more.
- UUID Generator — Online UUID generator and validator.
- JSON to CSV Converter — Online JSON to CSV converter.
You may also need
Continue with related browser-based tools on Toolshelf.
- Bulk Barcode Generator — Generate hundreds or thousands of barcodes from a CSV in your browser.
- QR Code Generator — Create QR codes for URLs, text, Wi-Fi, contacts, email, phone numbers and more.
- UUID Generator — Online UUID generator and validator.
- JSON to CSV Converter — Online JSON to CSV converter.