A palindrome reads the same backwards as forwards. Arabic rhetoric has a name for it: al-qalb, reversal, or ma la yastahilu bi-l-in'ikas, "what does not change when it is turned around". Al-Qazwini, in al-Idah fi 'Ulum al-Balagha, defines it as speech whose reading stays the same when its letters are reversed, and counts it among the ornaments of wording. The handbooks give two examples from the Quran: كُلٌّ فِي فَلَكٍ, "each in an orbit", said of the sun and the moon, and وَرَبَّكَ فَكَبِّرْ, "and your Lord, magnify".
Modern articles go further. Some present these phrases as a numerical sign, or tie رَبَّكَ فَكَبِّرْ to the palindromes of DNA. This page checks the famous phrases letter by letter, then has a computer find every palindrome in the Quran and asks two questions about them, with the rules for each fixed before any count was made: does the Quran's word order produce more palindromes than its own words in random order, and is its longest palindrome unusually long?
The palindrome finder below the article lists every one found, and checks any Arabic you type by the same rules.
The famous phrases
Reading letters as they are written in the Mushaf, spaces and vowel marks ignored:
| Verse | Words | Letters | Reads the same backwards? |
|---|---|---|---|
| 21:33 | كُلٌّ فِى فَلَكٍ | ك ل ف ى ف ل ك | Yes, in whole words |
| 36:40 | وَكُلٌّ فِى فَلَكٍ | و ك ل ف ى ف ل ك | Only without the opening wa, "and" |
| 74:3 | وَرَبَّكَ فَكَبِّرْ | و ر ب ك ف ك ب ر | Only without the opening wa |
All three are real. The phrase about the orbits occurs twice, and the handbooks cite the occurrence in Ya-Sin (36:40), where it begins with "and"; only al-Anbiya (21:33) has it as whole words. "And your Lord, magnify" needs its first letter set aside, as defenders of it say, because wa joins the sentence to the one before.
How a letter is counted matters. Reading the doubled consonants twice, as they are pronounced (the shadda), رَبَّكَ فَكَبِّرْ becomes ر ب ب ك ف ك ب ب ر and still reads the same backwards, but كُلٌّ فِى فَلَكٍ becomes ك ل ل ف ى ف ل ك and does not. With its vowels, neither phrase reads the same backwards: kullun fi falakin reversed is not kullun fi falakin. The classical definition is about letters as written, and as written both work.
Every palindrome in the Quran
To find them all we read every verse as one string of letters and ran Manacher's algorithm over it, the standard method that finds the longest palindrome around every possible centre in a single pass. Two kinds were kept:
- Phrase palindromes, the strict kind: whole words, starting at the first letter of a word and ending at the last letter of one, spanning two words or more, at least 5 letters long.
- Loose palindromes: strings that may start or end inside a word, as رَبَّكَ فَكَبِّرْ does inside وَرَبَّكَ, crossing at least one space, at least 7 letters long.
The Quran's 325,386 letters hold 18 phrase palindromes as written (21 when hamza, alif maqsura and ta marbuta are folded into the letters they resemble). Only two are as long as 7 letters:
| Verse | Phrase | Meaning | Letters |
|---|---|---|---|
| 21:33 | كُلٌّ فِى فَلَكٍ | each in an orbit | 7 |
| 12:8 | إِنَّ أَبَانَا | indeed, our father | 7 |
The second, from the words of Yusuf's brothers, reads ا ن ا ب ا ن ا both ways and is as exact as the famous one, though the handbooks we checked do not cite it. The other sixteen are 5 letters long, and almost all are a short particle meeting a pronoun:
| Phrase | Letters | Verses |
|---|---|---|
| إِن كُنَّا | ا ن ك ن ا | 7:113, 10:29, 21:17, 26:41, 26:51 (as أَن كُنَّآ), 26:97 |
| أَنَّ لَنَا, إِنَّ لَنَا | ا ن ل ن ا | 2:167, 7:113, 26:102 |
| إِنْ أَنَا | ا ن ا ن ا | 7:188, 26:115 |
| كُلُّ ذَٰلِكَ | ك ل ذ ل ك | 17:38, 43:35 |
| نَّعْفُ عَن | ن ع ف ع ن | 9:66 |
Two more, in passages on divorce and on Musa's mother, are counted in every figure on this page but, as on the site's other analyses, not shown.
Loosely, letting a palindrome start or end inside a word, there are 50 of 7 letters or more (60 folded). The longest we show is 11 letters, إِلَّآ أُو۟لُوا۟ ٱلْأَلْبَـٰبِ, "none but people of reason", whose letters ا ل ا ا و ل و ا ا ل ا mirror around the lam of ulu (2:269 and 3:7). Among the nine-letter ones is ٱلْأَوَّلُ وَٱلْـَٔاخِرُ, "the First and the Last" (57:3), whose mirror runs from the start of "the First" to the start of "the Last". A 15-letter one lies in a passage on marriage and is counted but not shown.
Test 1: the Quran's word order against its own words shuffled
If the palindromes were placed by design, the Quran's own word order should produce more of them than the same words in another order. We made 1,000 copies of the Quran with the words of every verse shuffled, each verse keeping exactly its own words, and counted the phrase palindromes in each.
The result runs the other way. The Quran has 18; every one of the 1,000 shuffled copies had more, between 33 and 82, 58.7 on average (folded, 21 against between 40 and 87, 61.9 on average). Of palindromes 7 letters long, the Quran has 2 and the shuffled copies 6.5 on average; 985 of the 1,000 had at least two.
The reason is grammar. Shuffled words put short particles side by side in orders Arabic never uses, إِلَّا لَا (ا ل ا ل ا) above all, and many of those pairs read the same backwards. Real sentences place their words by meaning and syntax, and that leaves fewer accidental mirrors, not more.
Test 2: the longest palindrome
Long palindromes are the rarest kind, so the last test looks at length. The Quran's longest phrase palindrome has 7 letters. The longest in the shuffled copies of test 1 averaged 9.3 letters, and 998 of the 1,000 had one of 7 letters or more. The Quran's longest is not unusually long.
The comparison with DNA
One popular article notes that رَبَّكَ فَكَبِّرْ uses four different letters, ra, ba, kaf and fa, as DNA uses four bases, and that both contain palindromes. The two are different things. A palindrome in DNA is a stretch whose partner on the other strand, read in its own direction, spells the same sequence: GAATTC pairs with CTTAAG, which read backwards is GAATTC again. It is not a mirror of itself. And four different letters is common in a phrase this short.
What this shows
The famous phrases are accurate. كُلٌّ فِى فَلَكٍ in al-Anbiya reads the same backwards in whole words, and the orbit verses and وَرَبَّكَ فَكَبِّرْ do once their opening wa is set aside. A third phrase of the same length, إِنَّ أَبَانَا, does too.
The tests do not show palindromes placed by design. The Quran has fewer than its own words give in random order, and no unusually long one. Any long Arabic text holds a few palindromes, mostly short particles meeting pronouns.
That is no loss to the classical view, which never rested on counting. The rhetoricians admired كُلٌّ فِى فَلَكٍ because the phrase turns back on itself as the sun and moon it describes come round in their orbits, a fit of sound to meaning that a count cannot measure. The Quran's own challenge is to "produce a surah like it" (Quran 2:23), not to find patterns in its letters; the wider question is taken up in Do numerical and ring-composition miracles prove the Quran divine?
How it was counted
- Letters are read as written in the Uthmani text of the Madinah Mushaf, as in the letter counter: alif in all its forms is alif; hamza alone and on its seats, alif maqsura and ta marbuta are letters of their own. The folded rule counts them as alif, waw or ya, and ha. Vowel marks, small high letters and pause marks are not letters.
- A palindrome lies within one verse. Every phrase palindrome is counted, nested ones included.
- The tests were fixed before any count was made. The shuffles use a fixed seed, so the same copies come back on every run. The pronounced-letter reading and the DNA comparison were looked at afterwards.
- Figures cover the whole Quran. Six passages whose subject is marriage, divorce, mothers or children (2:230, 17:64, 20:38, 57:20, 58:2, 65:6) are counted but not shown, here or in the finder.
Sources
- Quran text: the Madinah Mushaf (King Fahd Complex), reading of Hafs, in the Uthmani spelling published by quran.com; translations after The Clear Quran, Dr. Mustafa Khattab
- Al-Qazwini, al-Idah fi 'Ulum al-Balagha; 'Abd al-Ghani al-Nabulusi, Nafahat al-Azhar; Hifni Nasif and others, Durus al-Balagha; gathered in "Palindrome", al-balagha.com
- The DNA comparison: "Does the palindromes in Quran and DNA tell anything?", Kashmir Life; a critic's reading of 74:3: WikiIslam
- Glenn Manacher, "A new linear-time on-line algorithm for finding the smallest initial palindrome of a string", Journal of the ACM 22 (1975)
- Every figure on this page:
scripts/quran/palindromes.mjs, with the tests' rules fixed before they were run