# Issn validate

`issn-validate` · version 1.0.0 · Identifiers & check digits · free, no key needed

Validate an 8-digit ISSN's mod 11 check digit (X allowed) and compute its 977-prefixed EAN-13 barcode form.

**Use when you need to: validate an issn · check issn check digit · convert issn to ean 13 barcode.**

## Decide before calling

Read the [versioned contract](/v1/tools/issn-validate/versions/1.0.0) and the supported scope below. Reuse `issn-validate@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `issn-validate@1.0.0` for validate an issn. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- validate an issn
- check issn check digit
- convert issn to ean 13 barcode
- is this issn valid
- issn checksum validator
- journal serial number check digit
- turn an issn into a 977 barcode

## Not supported

- looking up which journal or serial an ISSN actually identifies
- validating an ISBN or ISMN (see isbn-validate / ismn-validate)
- computing the L-ISSN (linking ISSN) across print and electronic versions

## Behavior

- issue_variant is optional and defaults to '00'; when provided it must be exactly 2 digits, else invalid_input.
- issn accepts two lengths: 9 characters 'NNNN-NNNNc' with a literal '-' at position 5 (positions 1-4 and 6-8 are the 7 core digits, position 9 is the check character), or 8 characters with no separator (positions 1-7 core digits, position 8 the check character). Any other length is reason wrong_length, checked first.
- issn (the normalized NNNN-NNNN form) and check_digit are always reconstructed from those raw positions, regardless of whether any character is actually a valid digit; both are null only when length already failed.
- invalid_character fires when, for the 9-character form, position 5 is not '-', or any core digit position is not 0-9, or the check character is neither a digit nor 'X'.
- ean13 requires only that the 7 core digits are all 0-9: ean13 = '977' + core digits + issue_variant + a freshly computed EAN-13 check digit (weight 1,3 alternating, mod 10) over the resulting 12 digits; ean13 is null when a core digit is invalid, even if the overall reason is invalid_character only because of the check character or hyphen.
- Check digit (only evaluated once the hyphen/core/check-character positions are all valid): weights 8,7,6,5,4,3,2 over the 7 core digits; expected check character is (11 - sum mod 11) mod 11, X when 10. A mismatch is reason check_digit_mismatch.
- valid is true only when length, charset and the check digit all pass, in that order; only one reason is ever returned.

## Input

- `issn` (string, required): min length 1; max length 9
- `issue_variant` (string, optional): min length 2; max length 2; pattern `^[0-9]{2}$`

## Output

- `valid` (boolean, required)
- `reason` (one of null, "wrong_length", "invalid_character", "check_digit_mismatch", required)
- `issn` (string or null, required): min length 9; max length 9
- `check_digit` (string or null, required): min length 1; max length 1
- `ean13` (string or null, required): min length 13; max length 13

## Limits

- max issn bytes: 9

## Example

Request input:

```json
{
  "issn": "0378-5955"
}
```

Response:

```json
{
  "result": {
    "valid": true,
    "reason": null,
    "issn": "0378-5955",
    "check_digit": "5",
    "ean13": "9770378595002"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "issn-validate",
  "version": "1.0.0",
  "input": {
    "issn": "0378-5955"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/issn-validate/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"issn":"0378-5955"}'
```

The machine-readable contract is at [/v1/tools/issn-validate/versions/1.0.0](/v1/tools/issn-validate/versions/1.0.0).

### CLI

```sh
node cli.mjs run issn-validate 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Isbn validate](/tools/isbn-validate): Validate an ISBN-10 (mod 11, X allowed) or ISBN-13 (EAN mod 10) check digit and return the other form when it exists.
- [Ismn validate](/tools/ismn-validate): Validate an ISMN's EAN mod 10 check digit in M-form or 979-0 form and return the canonical 13-digit form.
- [Checkdigit validate](/tools/checkdigit-validate): Validate a full value's trailing check digit(s) against a named algorithm (Luhn, Verhoeff, Damm, ISO 7064, GS1, mod 10).
- [Iccid validate](/tools/iccid-validate): Validate a 19/20-digit ICCID's Luhn check digit, require the 89 major industry id, split issuer/account digits.
- [Isin validate](/tools/isin-validate): Validate a 12-character ISIN's ISO 6166 Luhn check digit and parse its country prefix, NSIN and NSIN scheme.
- [Iso6346 container validate](/tools/iso6346-container-validate): Validate an 11-character ISO 6346 container number's mod-11 check digit and split the owner code, category and serial.
