Skip to content

Main content

ISBN Check Digit Transposition Witness Tool

Witness checksum detection for an ISBN-13 digit transposition; registration and prefix allocation are not checked.

Loading tool…

Description

Witness checksum detection for an ISBN-13 digit transposition; registration and prefix allocation are not checked.

Identifier validation can involve several distinct questions: whether text has the expected shape, whether a checksum is consistent, and whether an authority actually assigned the identifier. Formatting and field extraction address narrower questions. Each result must be read according to the particular property the tool checks.

Witness checksum detection for an ISBN-13 digit transposition; registration and prefix allocation are not checked.

When to use this tool

Use ISBN Check Digit Transposition Witness when you need the particular shape, formatting, field, or checksum property as one explicit stage in an identifier workflow.

How to use the tool and how it works

  1. Enter digits, firstIndex, secondIndex. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read swapped, originalValid, swappedValid, undetected. Inspect originalValid, swappedValid, undetected before interpreting the associated values.

Require 13 digits and two distinct zero-based positions from zero through 12. Swap those characters, calculate alternating one/three weighted checksums before and after, and set undetected only when both pass and the text actually changed.1

Input fieldMeaning and unitsAccepted input
digitsDigitsRequired. Text; maximum UTF-16 length 8192.
firstIndexZero-based position in the supplied input.Required. Safe integer; minimum 0; maximum 12.
secondIndexZero-based position in the supplied input.Required. Safe integer; minimum 0; maximum 12.
Output fieldInterpretationReturned shape
swappedSwappedRequired. Text; maximum UTF-16 length 8192.
originalValidOriginal ValidRequired. Boolean.
swappedValidSwapped ValidRequired. Boolean.
undetectedUndetectedRequired. Boolean.
json
{
  "input": {
    "digits": "9780306406157",
    "firstIndex": 2,
    "secondIndex": 3
  },
  "output": {
    "swapped": "9708306406157",
    "originalValid": true,
    "swappedValid": false,
    "undetected": false
  }
}

Limitations and assumptions

  • Swapping equal digits is not undetected because no text changed. Prefix allocation and registry assignment are not checked, and this demonstrates one transposition rather than proving detection of all errors.
  • The field tables state structural bounds; the mechanics also specify cross-field constraints. Malformed inputs and unsupported domains cause errors. A successful false flag, empty branch value, or zero placeholder has the meaning stated above and is distinct from an input error.

Alternative or Complementary methods

Use a complete format and checksum validator when required, then consult the issuing registry or verification process for assignment and identity. Preserve meaningful leading zeros as text.

References

  1. Calculation and input contract: validate/isbn-check-digit-transposition-witness — tool.io

Similar or alternative tools

  • validate/isbn

    Validate ISBN-10 and Bookland-prefixed ISBN-13 identifiers after removing spaces and hyphens, reject the 979-0 ISMN range, and convert valid 978-prefixed identifiers between formats.

  • ISBN-13 EAN Prefix Member Check

    Check whether a 13-digit identifier starts with 978 or 979, without validating a complete ISBN.