EAN Barcode Generator DE EN

Interface: EAN barcode as an image

One image link is enough: the number is in the address, the response is the image. Use it in shops, mails and documents. The address of the old site keeps working unchanged.

Address

GET https://ean.loresoft.de/interface/ean-barcode?num=4012345678901&size=3&height=150&outputFormat=png

Parameters

NameValuesDefaultMeaning
num7, 8, 12, 13 digits-EAN number with 8 or 13 digits; with 7 or 12 digits the check digit is added
size1 … 63Bar width in pixels (narrowest bar)
height100 … 300150Image height in pixels
outputFormatpng · jpg · gif · svgpngOutput format (outputFormat; format works too)
quality10 … 100100Quality, only used for jpg
downloadtrue-true = deliver as a file to save

Note: missing values fall back to the defaults. A number with a wrong check digit gives an image with the text "Invalid EAN", as before (status code 422).

Examples

Image in HTML

<img src="https://ean.loresoft.de/interface/ean-barcode?num=4012345678901&size=3&height=150" alt="EAN 4012345678901">

Download a file

curl -o barcode.svg "https://ean.loresoft.de/interface/ean-barcode?num=4012345678901&outputFormat=svg"

Build the address in PHP

$url = 'https://ean.loresoft.de/interface/ean-barcode?' . http_build_query([
 'num' => $ean, 'size' => 3, 'height' => 150, 'outputFormat' => 'png',
]);

Limits

Up to 600 images per hour and address. Responses can be cached by the browser for a long time.

Errors

If the number is missing, the interface answers with status 400 and a JSON object like {"err": "missing or invalid num"}; with 429 when there are too many requests.