Skip to content

Main content

Quran Surah Ayah Range Parser Tool

Parse an ASCII surah:ayah[-ayah] inclusive reference with a caller-supplied verse-count bound; no edition-specific verse table is embedded.

Loading tool…

Description

Parse positive surah:ayah or surah:first-last syntax without leading zeros.

Source-scoped cultural and historical records preserve an edition, naming convention, or local identifier. Literal agreement is useful bookkeeping but does not establish interpretation, authenticity, or authority.

Parse positive surah:ayah or surah:first-last syntax without leading zeros.

When to use this tool

Use Quran Surah Ayah Range Parser when you need a precise source-token or range consistency check.

How to use the tool and how it works

  1. Enter reference, maximumAyah. 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 surah, firstAyah, lastAyah, count. Use the output convention below.

Parse positive surah:ayah or surah:first-last syntax without leading zeros. Bound surah by 114 and ayah endpoints by supplied maximumAyah; return the inclusive count.1

Input fieldMeaning and unitsAccepted input
referenceReferenceRequired. Text; maximum UTF-16 length 8192.
maximumAyahMaximum AyahRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
surahSurahRequired. Safe integer.
firstAyahFirst AyahRequired. Safe integer.
lastAyahLast AyahRequired. Safe integer.
countCountRequired. Safe integer.
json
{
  "input": {
    "reference": "2:255-257",
    "maximumAyah": 286
  },
  "output": {
    "surah": 2,
    "firstAyah": 255,
    "lastAyah": 257,
    "count": 3
  }
}

Limitations and assumptions

  • The caller must provide the correct maximum for the intended surah and edition; no text or verse table is consulted.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Consult the source edition and relevant community or scholarly guidance before interpreting or reusing the material.

References

  1. Calculation and input contract: islamic-studies/quran-surah-ayah-range-parser — tool.io

Similar or alternative tools