---
title: "Discussion on \"How barcode check digits work (EAN-13 and UPC-A, with a 10-line function)\" | Hashnode"
description: "Discussion on \"How barcode check digits work (EAN-13 and UPC-A, with a 10-line function)\". The last digit of an EAN-13 or UPC-A barcode isn't part of the product number. It's a check digit, there so a scanner can catch a misread.\nThe EAN-13 rule\nTake the first 12 digits. Counting from the l"
url: "https://hashnode.com/posts/how-barcode-check-digits-work-ean-13-and-upc-a-with-a-10-line-function/6af83b8b8359a8a48f613116"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How barcode check digits work (EAN-13 and UPC-A, with a 10-line function)](https://gotoolsonline.hashnode.dev/how-barcode-check-digits-work-ean-13-and-upc-a-with-a-10-line-function?utm_source=hashnode&utm_medium=feed)

The last digit of an EAN-13 or UPC-A barcode isn't part of the product number. It's a check digit, there so a scanner can catch a misread. The EAN-13 rule Take the first 12 digits. Counting from the l

5d ago · 2 min read · gotoolsonline.hashnode.dev  
Read the article

-   [#barcode](https://hashnode.com/tag/barcode)
-   [#ecommerce](https://hashnode.com/tag/ecommerce)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[GoToolsOnline](https://hashnode.com/@gotoolsonline)

@gotoolsonline

  
[View profile](https://hashnode.com/@gotoolsonline)

Free online tools for developers: JSON, text, image and more. No sign-up.

I run GoToolsOnline (gotoolsonline.com), a free collection of browser tools for developers and students. No sign-up.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
