A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.
Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.
✳
✳
✓ Free to use✓ No sign-up✓ 500+ possibilities
About this tool
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 it
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
- Select the barcode format (EAN-13, UPC-A, Code 128, Code 39).
- Enter custom data or click Generate for a random sample value.
- The barcode renders instantly with the correct check digit.
- Download as SVG or PNG for use in test environments.
- Select the barcode format from the dropdown — EAN-13, UPC-A, Code 128, Code 39, or QR Code.
- Enter custom data, or click Generate Sample to fill in a random valid value of the right length.
- The barcode renders instantly in the preview pane; the check digit (for numeric formats) is auto-computed.
When it helps
- Testing barcode scanner hardware or software integrations during development or QA.
- Creating sample product barcodes for demo inventory systems, POS prototypes, or design reviews.
- Generating test labels for retail or logistics software.
- Building barcode examples for documentation or presentations.
Examples
InputFormat: EAN-13, Data: 590123412345 (12 digits, check digit auto)
Expected result5901234123457 (13 digits — last digit is computed check digit)
InputFormat: UPC-A, Data: 03600029145 (11 digits)
Expected result036000291452 (12 digits — last digit is computed check digit)
03Code 128 shipping label
InputFormat: Code 128, Data: TEST-PKG-12345
Expected resultCode 128 image encoding TEST-PKG-12345 (downloadable as SVG/PNG)
04QR code with sample URL
InputFormat: QR, Data: https://example.test/sample
Expected resultSquare 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.
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.