Be grateful to Allah. And whoever is grateful is grateful for himself.
Quran 31:12
Quran 31:12

“Be grateful to Allah. And whoever is grateful is grateful for himself.”

Verily, I granted Luqman the understanding of religion and correctness in matters, and I told him, “O Luqman! Be grateful to your Lord for the blessing of being able to obey Him He has bestowed upon you.

The plain meaning, from Al-Mukhtasar fi at-Tafsir

The full passage

وَلَقَدْ ءَاتَيْنَا لُقْمَٰنَ ٱلْحِكْمَةَ أَنِ ٱشْكُرْ لِلَّهِ ۚ وَمَن يَشْكُرْ فَإِنَّمَا يَشْكُرُ لِنَفْسِهِۦ ۖ وَمَن كَفَرَ فَإِنَّ ٱللَّهَ غَنِىٌّ حَمِيدٌ

And We had certainly given Luqmān wisdom and said, "Be grateful to Allah." And whoever is grateful is grateful for the benefit of himself. And whoever denies His favor - then indeed, Allah is Free of need and Praiseworthy.

Quran 31:12The Arabic it was clipped from
The explanation

What does Quran 31:12 mean?

This is the opening of Luqman’s story — a man the Qur’an describes as given wisdom, and whom the early scholars generally took to be a righteous servant rather than a prophet. The first thing wisdom is said to consist of is gratitude. And the verse immediately closes the loop: whoever is grateful benefits himself, because Allah is free of all need — the gratitude was never for His sake.

Written from Al-Mukhtasar fi at-Tafsir

Where it sits