EAN‑13 barcodes, done properly

A small, public utility for generating deterministic EAN‑13 barcodes.

What is this?

ean13.wrid.org is a simple, public service that generates EAN‑13 barcodes as standards-compliant images (SVG or PNG). It is designed for long-term use in publishing, retail, libraries, education, and archival material.

No tracking. No analytics. No URL shorteners. Just encoding.

Generate an EAN‑13 barcode

The result will be returned as an image (SVG by default, PNG if requested via the Accept header).

How to use it

You can embed the result directly in documents, PDFs, or HTML without further processing.

Parameters

What do px and h actually change? EAN‑13 is a fixed-width symbol (117 modules including quiet zones), so image sizing is mostly about selecting an appropriate module width and an appropriate bar height for where the barcode will be printed.

Tip: For print at 300 DPI, a 2" wide barcode is ~600 px. For back covers and labels, many workflows prefer 900–1200 px PNGs to allow comfortable scaling and cropping.

Content negotiation

This service supports HTTP content negotiation. The same URL can return different representations depending on the Accept header sent by the client.

This allows the same endpoint to be used interactively by humans and programmatically by machines, without changing URLs. Note: h applies to both SVG and PNG; px applies to PNG output.

CURL Examples

Generate SVG

Best for layout tools and vector workflows (InDesign, LaTeX, web). Use h to match a print layout.

curl -H "Accept: image/svg+xml" \
  "https://ean13.wrid.org/?encode=9780306406157" \
  --output ean13.svg

Generate PNG

Best for raster-only workflows. Use px to request a print-friendly size.

curl -H "Accept: image/png" \
  "https://ean13.wrid.org/?encode=9780306406157" \
  --output ean13.png

Generate PNG with custom size

Example: a larger PNG plus a taller bar height for book covers, labels, and production PDFs.

curl -H "Accept: image/png" \
  "https://ean13.wrid.org/?encode=9780306406157&px=1200&h=320" \
  --output ean13-1200x320.png

Why another barcode generator?

Most barcode generators today are marketing tools. This one is infrastructure.

What’s next?

In the future, paths like ean13.wrid.org/<id> will resolve EAN‑13 barcodes backed by WRID records.

The current ?encode= endpoint will remain available.