Processes multiple Tanzil Quran text variants and produces structured output files in JSON, YAML, and XML formats.
The processed/ folder is committed to this repository.
Each source variant in src/resources/ is exported to its own folder:
processed/simple/processed/simple-clean/processed/simple-imlaai/processed/simple-minimal/processed/simple-plain/processed/uthmani/processed/uthmani-all/
Inside each folder, you will find:
quran-<variant>.jsonquran-<variant>.yamlquran-<variant>.xml
- uthmani / uthmani-all: Uthmani-script variants for general Quran text usage.
- simple / simple-clean / simple-minimal / simple-plain: simplified-script variants for different normalization needs.
- simple-imlaai: special variant used only for ASR matching.
Warning:
simple-imlaaiis provided for ASR matching workflows only and should not be used for any other purpose.
Each file contains a top-level object with two fields: metadata and surahs.
{
"source": "Tanzil Project",
"version": "Uthmani, Version 1.1",
"repository": "dotquran/corpus",
"website": "https://tanzil.net",
"license": "Creative Commons Attribution 3.0",
"termsOfUse": "...",
"processedBy": "github.com/dotquran/corpus",
"processedAt": "Sat, 11 Apr 2026 14:19:46 GMT"
}An array of surah objects:
{
"number": 2,
"name": "البقرة",
"loc": "مدنية",
"ayahs": [...]
}locis eitherمكية(Makki) orمدنية(Madani).
Each surah contains an array of ayah objects:
{ "number": 1, "text": "الٓمٓ" }
{ "number": 23, "text": "...", "marks": ["sajda"] }
{ "number": 26, "text": "...", "marks": ["rub' hizb"] }marksis optional and may contain"sajda"and/or"rub' hizb".
- Surah 1 (Al-Fatihah): the Basmalah is ayah 1 as it is counted as an actual verse.
- Surah 9 (At-Tawbah): no Basmalah.
- All other surahs: the Basmalah is separated from the first ayah and given ayah number 0, keeping the original ayah numbering intact.
{ "number": 0, "text": "بِسْمِ ٱللَّهِ ٱلرَّحْمَـٰنِ ٱلرَّحِيمِ" },
{ "number": 1, "text": "الٓمٓ" }Requires Node.js 18+.
npm install
npm run generateOutput files are written to processed/<variant>/.
The Quran text is sourced from the Tanzil Project (src/resources/*.txt) and is used under the Creative Commons Attribution 3.0 license. The text may not be modified. Any redistribution must credit Tanzil Project and link back to tanzil.net.