EAN Barcode Decoder

Read EAN-13 and EAN-8 barcodes to extract GTINs and check digits

EAN
Example: 4006381333931

Our free EAN barcode decoder reads EAN-13 and EAN-8 product identifiers from a barcode image or entered digits. EAN-13 encodes a 13-digit GTIN and EAN-8 an eight-digit GTIN; both end with a check digit. These codes identify retail products, not their current selling prices.

Need to decode EAN barcodes in your app?

Copy the example below to get started using our free Barcode Parser API. No API key needed.

cURL Node.js Python C# Go PHP Java HTML
barcode=$'4006381333931'
curl -sS -G https://parser.orcascan.com/ \
    --data-urlencode "barcode=$barcode" \
    --data-urlencode 'type=ean'
// Node.js 18+
var barcode = "4006381333931";
var url = "https://parser.orcascan.com/?barcode=" + encodeURIComponent(barcode) + "&type=ean";

fetch(url)
    .then(function(res) { return res.json(); })
    .then(console.log);
import json
from urllib.parse import quote
from urllib.request import urlopen

barcode = "4006381333931"
url = "https://parser.orcascan.com/?barcode=" + quote(barcode, safe="") + "&type=ean"

with urlopen(url) as response:
    print(json.load(response))
using System;
using System.Net.Http;

var barcode = "4006381333931";
var url = "https://parser.orcascan.com/?barcode=" + Uri.EscapeDataString(barcode) + "&type=ean";

using var client = new HttpClient();
Console.WriteLine(await client.GetStringAsync(url));
package main

import (
    "io"
    "net/http"
    "net/url"
    "os"
)

func main() {
    barcode := "4006381333931"
    endpoint := "https://parser.orcascan.com/?barcode=" + url.QueryEscape(barcode) + "&type=ean"
    res, err := http.Get(endpoint)
    if err != nil { panic(err) }
    defer res.Body.Close()
    io.Copy(os.Stdout, res.Body)
}
<?php
$barcode = "4006381333931";
$url = "https://parser.orcascan.com/?barcode=" . rawurlencode($barcode) . "&type=ean";

echo file_get_contents($url);
import java.net.URI;
import java.net.URLEncoder;
import java.net.http.*;
import java.nio.charset.StandardCharsets;

class BarcodeParser {
    public static void main(String[] args) throws Exception {
        String barcode = "4006381333931";
        String url = "https://parser.orcascan.com/?barcode=" +
            URLEncoder.encode(barcode, StandardCharsets.UTF_8) + "&type=ean";
        var request = HttpRequest.newBuilder(URI.create(url)).build();
        var response = HttpClient.newHttpClient().send(
            request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
<!doctype html>
<html>
<body>
<pre id="result">Loading...</pre>
<script>
var barcode = "4006381333931";
var url = "https://parser.orcascan.com/?barcode=" + encodeURIComponent(barcode) + "&type=ean";
fetch(url)
    .then(function(res) { return res.json(); })
    .then(function(json) {
        document.getElementById("result").textContent = JSON.stringify(json, null, 2);
    });
</script>
</body>
</html>

Need to decode lots of EAN barcodes?

Import a spreadsheet of barcodes and automatically extract their data into separate columns.

Decode barcodes in bulk →

Need to extract EAN data as you scan?

Scan barcodes with your phone and automatically capture their data in a shared spreadsheet.

Scan with your phone →

Frequently asked questions

What is the difference between EAN-13 and EAN-8?

EAN-13 encodes a 13-digit GTIN, while EAN-8 encodes an eight-digit GTIN for smaller labels. They use different symbol layouts.

How is the EAN check digit calculated?

The final digit is calculated from the other digits using alternating weights of 1 and 3, then modulo 10. A decoder can check whether the digits are consistent.

Why does an EAN-13 barcode have 13 digits but fewer visible patterns?

EAN-13 encodes its first digit through the parity pattern of the six left-hand digits. The remaining digits are represented by the bars and spaces.

Need help tracking EAN barcodes?

We've helped organizations of all sizes tackle barcode challenges, chat with our team live for help to find a solution.