Barcode Generator
Generate barcodes in 8 formats — style, size for print, and export as SVG or PNG, all in your browser.
Barcode settings
Use for: Retail products worldwide
Accepts: Digits only (0–9)
Length: 12 digits (check digit added) or 13 digits
Check digit: The 13th digit is a mod-10 check digit, auto-calculated from the first 12.
Which barcode format should I choose?
- EAN-13 — Retail products worldwide
- UPC-A — Products in the US and Canada
- EAN-8 — Small retail packaging
- CODE128 — Shipping, inventory and general purpose
- CODE39 — Industrial and asset labels
- ITF-14 — Cartons and logistics (shipping containers)
- MSI — Inventory and warehouse shelf marking
- Pharmacode — Pharmaceutical packaging control
Valid value· 13/13 digits
Check digit valid. Final barcode value: 5901234123457.
Preview
EAN-13Encoded value: 5901234123457
Previews scale to your screen — use SVG or a high-DPI PNG for print.
Export
Saves as barcode-ean13.svg / barcode-ean13.png
SVG is recommended for print — it stays sharp at any size. Use Print to save as PDF from your browser.
Examples
EAN-13 product barcode
Enter 12 digits (check digit auto-computed) or all 13 digits, select EAN13, and download the SVG to include on a product label. EAN-13 is the standard format used on most retail products worldwide.
CODE128 internal label
CODE128 encodes any printable ASCII character, making it ideal for internal part numbers, shipping labels, or any alphanumeric identifier. Enter your value, adjust height to 60px for a compact label, and export as PNG.
Details
This tool generates standard 1-D barcodes entirely in your browser — no data is sent to a server. Choose from eight widely-used formats, enter a value, tweak line width and height, and toggle the human-readable text below the bars. When the value is invalid for the chosen format (wrong character set or digit count) the error is shown instantly. Download the result as a lossless SVG or a rasterised PNG for print or web use.
Examples
Auto-compute the EAN-13 check digit from 12 data digits
format: EAN13
value: 590123412345Encoded value: 5901234123457Entering 12 digits triggers the GTIN mod-10 check: alternating weights of 3 and 1 applied to the data digits give a check digit of 7, producing the final 13-digit barcode 5901234123457.
Detect a wrong EAN-13 check digit
format: EAN13
value: 5901234123450Check digit should be 7, but you entered 0. Correct value: 5901234123457When a full 13-digit value is entered, the trailing digit is verified against the recomputed check digit; a 'Fix check digit' button rewrites the input to the correct value in one click.
Validate a CODE128 alphanumeric value
format: CODE128
value: ABC-12345Valid valueCODE128 accepts any printable ASCII character and any length; the format-specific sample list includes identifiers such as ABC-12345 for internal parts.
About this tool
The Barcode Generator creates standard 1-D barcodes for products, logistics, pharmaceuticals, and internal labels — all inside your browser with no data ever leaving your device. Enter a value, pick from eight widely-used formats, and the barcode renders immediately.
Each format enforces its own character set and length rules. The tool validates your input before rendering and surfaces a clear error when the value is incompatible — for example EAN-13 requires 12–13 digits, while CODE39 permits only uppercase letters, digits, and a few symbols.
When the barcode looks right, export it as a lossless SVG for scalable print use or as a 2× PNG for web and documents. Controls for line width, bar height, and human-readable text let you match any label specification.
How to use
Generate a CODE128 barcode
Select CODE128, type any text value, and adjust the line width and height sliders. The barcode updates live; click Download SVG or PNG to save.
Create an EAN-13 product barcode
Select EAN-13 and enter 12 digits (the check digit is computed automatically) or all 13. An invalid value shows an error; once valid, download for print.
Export a high-resolution PNG
Click Download PNG to render the barcode into a canvas at 2× resolution with a white background — ready for labels or documents.
Use cases
Producing a retail EAN-13 label for testing
Enter 12 or 13 digits, let the tool compute the check digit if needed, and download the SVG for placement on a mock product.
Generating an internal CODE128 inventory label
Encode a part number or SKU containing letters and dashes, resize height to 60px for a compact label, and export as PNG for printing.
Verifying a barcode from a printed sample
Type the digits under the printed bars to confirm the EAN-13 or UPC-A check digit matches, catching scanning errors before they leave the warehouse.
Building a Pharmacode for a pharma package
Enter a small integer (3–131070) and use Pharmacode to get the pharmaceutical-specific binary encoding, then export the SVG at 300 DPI for print.
Barcode format reference
| Format | Typical use |
|---|---|
| CODE128 | Shipping labels, part numbers, any ASCII text |
| CODE39 | Automotive/military labels, uppercase alphanumeric IDs |
| EAN-13 | Retail product packaging worldwide (13 digits) |
| EAN-8 | Small product packaging (8 digits) |
| UPC-A | North-American retail products (12 digits) |
| ITF-14 | Outer carton / wholesale packaging (14 digits) |
| Pharmacode | Pharmaceutical packaging (number 3–131070) |
Common mistakes
Mistake:Typing a 12-digit EAN-13 value without the check digit and assuming the encoded value is the 12-digit input.
Fix:EAN-13 always encodes 13 digits; entering 12 triggers automatic check-digit computation and the displayed 'Encoded value' is the 13-digit full string.
Mistake:Using lowercase letters in CODE39.
Fix:CODE39 only accepts uppercase A–Z, digits and a small set of symbols (- . $ / + % and space). Lowercase input fails validation immediately.
Mistake:Setting a quiet zone (margin) smaller than 8 px.
Fix:Small margins can cause unreliable scans. The tool warns when margin < 8 px; 10 px is the default and a safe lower bound for most scanners.
Mistake:Exporting a low-resolution PNG when print quality matters.
Fix:SVG is lossless at any size and is the recommended export for print. For PNG, raise the scale (2× or 3×) and the DPI to keep edges sharp on a 300 DPI printer.
Frequently asked questions
Related guides
References & standards
Related tools
Aspect Ratio Calculator
Calculate dimensions and ratios for images and videos.
Base64 Image Encoder
Open the Image workspace in Base64 Toolbox to resize and convert images to Base64 data URIs, then copy HTML, CSS, Markdown or JavaScript snippets.
Border Radius Generator
Visually craft CSS border-radius values — including the advanced 8-value slash syntax for organic blob shapes — with a live preview and one-click copy.
CSS Grid Generator
Visually build CSS Grid layouts — set columns, rows and gaps, see a live preview, and copy production-ready grid-template CSS.
Cubic Bezier / Easing Generator
Build a CSS cubic-bezier() timing function visually — drag control points, preview common presets, see the easing curve live, and copy the transition-timing-function CSS.
EXIF Viewer & Cleaner
View and remove EXIF metadata from images. See camera info, GPS location, and dates — then download a clean copy.