@alkarartech/quran-english
v1.0.0
Published
The Holy Quran — English translation (Qarai / Shia) in structured JSON for programmatic use
Maintainers
Readme
📖 @alkarartech/quran-english
The Holy Quran — English translation in structured JSON for apps, bots, and developers.
Full text: 114 surahs, 6,236 verses, ready to import and use in any JavaScript or TypeScript project.
This package uses the Shia English translation by Ali Quli Qara'i (phrase-by-phrase, widely used and respected).
✨ Features
| Feature | Description |
|--------|-------------|
| Format | Structured JSON — surahs and verses with number and text |
| Module support | ESM and CommonJS; TypeScript types included |
| Size | ~1 MB unpacked; tree-shakeable via JSON import |
| Attribution | Clear credit to the translator and source |
📥 Install
npm install @alkarartech/quran-english🚀 Usage
ESM (recommended)
import quran, { surahs } from '@alkarartech/quran-english';
console.log(surahs.length); // 114
const alFatiha = surahs[0];
console.log(alFatiha.name); // "Al-Fatiha"
console.log(alFatiha.verseCount); // 7
console.log(alFatiha.verses[0].text); // "In the Name of Allah, the All-beneficent, the All-merciful."CommonJS
const { surahs } = require('@alkarartech/quran-english');
const surah2 = surahs[1];
console.log(surah2.name); // "Al-Baqara"Raw JSON
import data from '@alkarartech/quran-english/data';
// data.surahs — same structureTypeScript
import type { Surah, Verse } from '@alkarartech/quran-english';
import { surahs } from '@alkarartech/quran-english';
const s: Surah = surahs[0];
const v: Verse = s.verses[0];📐 Data shape
| Level | Shape |
|-------|--------|
| Root | { surahs: Surah[] } |
| Surah | { number, name, verseCount, verses } |
| Verse | { number, text } |
Example
{
"surahs": [
{
"number": 1,
"name": "Al-Fatiha",
"verseCount": 7,
"verses": [
{ "number": 1, "text": "In the Name of Allah, the All-beneficent, the All-merciful." },
{ "number": 2, "text": "All praise belongs to Allah, Lord of all the worlds," }
]
}
]
}🙏 Translator & translation
Ali Quli Qara'i
This package uses the English translation by Ali Quli Qara'i. It is a Shia translation of the Quran, widely used in English-speaking Shia communities and on platforms such as Al-Islam.org.

About the translator
- Ali Quli Qara'i graduated from Osmania University, Hyderabad, with a B.E. in 1970.
- He moved to the U.S. and received an M.B.A. from the University of Wisconsin, Madison (1997).
- He is a writer and translator and served as editor-in-chief of the English quarterly Al-Tawhid for 14 years.
- He has translated many texts from Arabic and Persian into English.
- His major work is the phrase-by-phrase English translation of the Qur'an, which is the basis of this package.
Links
| Resource | Link | |----------|------| | Biography | Ali Quli Qara'i — Al-Islam.org | | Free English PDF | Holy Quran — English Translation (PDF) |
We ask that you respect the translator’s work and use this package for personal, educational, and app use in line with the sources above.
📜 Source & license
- Source text: The translation in this repo is derived from the Qarai English translation (Ali Quli Qara'i).
- Package: MIT — see LICENSE.
- Translation: Please follow the terms of the original publishers (e.g. Al-Islam.org, duas.org) when reusing or redistributing the translation text.
🛠 Scripts
| Command | Description |
|---------|-------------|
| npm run build | Parses quran.txt → data/quran.json and builds dist/ (ESM, CJS, types). Run after editing quran.txt. |
| prepublishOnly | Runs build automatically before npm publish. |
📦 Repository
The repo holds the canonical quran.txt; the package adds the parsed JSON and built files for easy install and import.
📌 Publish note (npm scope)
This package is published under the @alkarartech scope so it can be published with a standard npm account. To publish:
npm login
npm run build
npm publish --access public--access public is required for scoped packages the first time.
