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
-
https://ean13.wrid.org?encode=9780306406157 -
https://ean13.wrid.org?encode=9780306406157&px=1200&h=320(PNG size) - Returns image/svg+xml or image/png based on the Accept header
- Cacheable and deterministic
You can embed the result directly in documents, PDFs, or HTML without further processing.
Parameters
encode— EAN‑13 digits to encode (required; accepts 12 digits to auto-add the check digit, or 13 digits with a valid check digit)px— Target PNG width in pixels (optional; default 600; min 300; max 2400)h— Bar height in pixels (optional; default 260; min 80; max 600)
Content negotiation
This service supports HTTP content negotiation. The
same URL can return different representations depending on the
Accept header sent by the client.
- image/svg+xml — returns an SVG EAN‑13 barcode (default)
- image/png — returns a PNG EAN‑13 barcode
- text/html — returns this documentation page
This allows the same endpoint to be used interactively by humans and programmatically by machines, without changing URLs.
CURL Examples
Generate SVG
curl -H "Accept: image/svg+xml" \
"https://ean13.wrid.org/?encode=9780306406157" \
--output ean13.svg
Generate PNG
curl -H "Accept: image/png" \
"https://ean13.wrid.org/?encode=9780306406157" \
--output ean13.png
Generate PNG with custom size
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.
- No dependency on third-party APIs
- Open, inspectable output
- Stable URLs
- Built for long-lived documents
What’s next?
In the future, paths like
ean13.wrid.org/<id>
will resolve QR codes backed by WRID records.
The current ?encode= endpoint will remain available.