UtilityKit

500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.

Sample Barcode Generator

Generate scannable sample barcodes in EAN-13, UPC-A, Code 128, QR, and Code 39 formats with correct check digits.

About Sample Barcode Generator

The Sample Barcode Generator creates valid barcodes in the most common retail and logistics formats: EAN-13 (European Article Number, 13 digits with check digit), UPC-A (Universal Product Code, 12 digits), Code 128 (variable-length alphanumeric, used in shipping and logistics), Code 39 (older alphanumeric standard), and QR code. All numeric barcode formats include correctly computed check digits. The rendered barcode can be downloaded as SVG (vector, scalable) or PNG. This is useful for testing barcode scanner integrations, creating sample product labels, generating demo inventory data, and testing barcode reading code without needing real product data.

Why use Sample Barcode Generator

  • Supports EAN-13, UPC-A, Code 128, Code 39, and QR Code formats.
  • Auto-computes check digits for all supported numeric formats.
  • Downloadable SVG and PNG output for use in label templates.
  • Instant browser-based rendering — no server or library download needed.
  • Supports five major formats — EAN-13, UPC-A, Code 128, Code 39, and QR Code — covering retail, logistics, industrial, and 2D needs.
  • Auto-computes mod-10 check digits for all numeric formats — output is always structurally valid.

How to use Sample Barcode Generator

  1. Select the barcode format (EAN-13, UPC-A, Code 128, Code 39).
  2. Enter custom data or click Generate for a random sample value.
  3. The barcode renders instantly with the correct check digit.
  4. Download as SVG or PNG for use in test environments.
  5. Select the barcode format from the dropdown — EAN-13, UPC-A, Code 128, Code 39, or QR Code.
  6. Enter custom data, or click Generate Sample to fill in a random valid value of the right length.
  7. The barcode renders instantly in the preview pane; the check digit (for numeric formats) is auto-computed.

When to use Sample Barcode Generator

  • Testing barcode scanner hardware or software integrations.
  • Creating sample product barcodes for demo inventory systems.
  • Generating test labels for retail or logistics software.
  • Building barcode examples for documentation or presentations.
  • Testing barcode scanner hardware or software integrations during development or QA.
  • Creating sample product barcodes for demo inventory systems, POS prototypes, or design reviews.

Examples

EAN-13 sample

Input: Format: EAN-13, Data: 590123412345 (12 digits, check digit auto)

Output: 5901234123457 (13 digits — last digit is computed check digit)

UPC-A sample

Input: Format: UPC-A, Data: 03600029145 (11 digits)

Output: 036000291452 (12 digits — last digit is computed check digit)

Code 128 shipping label

Input: Format: Code 128, Data: TEST-PKG-12345

Output: Code 128 image encoding TEST-PKG-12345 (downloadable as SVG/PNG)

QR code with sample URL

Input: Format: QR, Data: https://example.test/sample

Output: Square QR matrix encoding the URL (scannable with any QR reader)

Tips

  • For retail testing, prefer EAN-13 or UPC-A — these are the formats real-world POS systems handle most often.
  • For shipping or logistics tests, use Code 128 — it encodes both letters and digits at high density and is the de facto standard on shipping labels.
  • When printing, always export SVG and let your printer rasterize at native DPI; PNG can blur if the printer DPI doesn't match.
  • Always include a quiet zone (white space) of at least 10× the narrow-bar width on each side, or scanners may fail to read.
  • If a sample barcode won't scan, increase the size or check that the bar color contrast against the background is at least 80% reflectance difference.
  • Mark sample barcodes clearly in any printed label preview as TEST or SAMPLE to prevent accidental shelf placement on real products.
  • For QR test data, include a clearly fake URL (e.g. https://example.test/sample) so it is obviously not a real link.

Frequently Asked Questions

What is EAN-13?
EAN-13 (International Article Number) is a 13-digit barcode standard used globally for product identification. It is the most common retail barcode format outside North America.
What is the difference between EAN-13 and UPC-A?
UPC-A is a 12-digit US/Canadian standard. EAN-13 is a superset: a UPC-A with a leading 0 is a valid EAN-13. Most scanners read both formats.
Are generated barcodes scannable?
Yes. The rendered barcodes are graphically valid and scannable with a barcode reader, but the encoded number is sample data — it does not correspond to a real registered product.
What is Code 128?
Code 128 is a high-density linear barcode that encodes the full ASCII character set (128 characters). It is widely used in shipping labels, healthcare, and logistics.
How is the EAN-13 check digit calculated?
The check digit is computed by summing the digits with alternating weights of 1 and 3, then subtracting the result mod 10 from 10. The 13th digit makes the entire barcode sum to a multiple of 10.

Explore the category

Glossary

EAN-13
European Article Number — a 13-digit barcode standard used globally for retail product identification, with a single mod-10 check digit at position 13. The most common retail barcode worldwide.
UPC-A
Universal Product Code, version A — a 12-digit barcode standard used in the US and Canada for retail products. A UPC-A with a leading 0 is a valid EAN-13.
Code 128
A high-density linear barcode that encodes the full ASCII character set (128 characters). Three subsets (A, B, C) optimize encoding length. Used heavily in shipping, healthcare, and logistics.
Code 39
An older alphanumeric barcode encoding 0-9, A-Z, hyphen, period, space, and seven symbols. No check digit by default. Common in industrial and inventory tags.
QR Code
Quick Response Code — a 2D matrix barcode that encodes URLs, text, or binary data. Includes Reed-Solomon error correction so codes scan even when partially damaged.
Check digit (mod 10)
The trailing digit of a numeric barcode, computed by summing odd-position digits, multiplying even-position digits by 3, summing both, and choosing the digit that makes the total divisible by 10.
Quiet zone
The blank margin on either side of a barcode (typically 10× narrow-bar width) that lets the scanner detect the start and stop of the bar pattern. Insufficient quiet zone is a leading cause of unreadable barcodes.
GS1
GS1 is the global standards organization that issues real GTIN/UPC/EAN prefixes to manufacturers. Sample barcodes generated by this tool are NOT registered with GS1.