Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:2:77

But do they not know that Allah knows what they conceal and what they declare?  

God says: Know they not (the interrogative is affirmative, the inserted wāw ˹of a-wa-lā˺ is to indicate the supplement) that God knows what they keep secret and what they proclaim?, that is, what they hide and what they reveal in this matter and all other matters, so that they may desist from these things.
القرآن:٢:٧٧

أَوَلَا يَعْلَمُونَ أَنَّ اللَّهَ يَعْلَمُ مَا يُسِرُّونَ وَمَا يُعْلِنُونَ  

قال تعالى {أو لا يعلمون} الاستفهام للتقرير والواو الداخلة عليها للعطف {أن الله يعلم ما يسرون وما يعلنون} ما يخفون وما يظهرون من ذلك وغيره فيرعَوُوا عن ذلك.

See similar narrations below:

Collected by Qurʾān
quran:9:78

Did they not know that Allah knows their secrets and their private conversations and that Allah is the Knower of the unseen?  

Did they, the hypocrites, not know that God knows their secret, what they conceal within themselves, and their confidential talks, what they confide in each other, and that God is the Knower of the hidden things?, what is concealed from the eyes.
القرآن:٩:٧٨

أَلَمْ يَعْلَمُوا أَنَّ اللَّهَ يَعْلَمُ سِرَّهُمْ وَنَجْوَاهُمْ وَأَنَّ اللَّهَ عَلَّامُ الْغُيُوبِ  

{ألم يعلموا} أي المنافقون {أن الله يعلم سرهم} ما أسروه في أنفسهم {ونجواهم} ما تناجوا به بينهم {وأنّ الله علام الغيوب} ما غاب عن العيان ولما نزلت آية الصدقة جاء رجل فتصدق بشيء كثير فقال المنافقون: مُراءٍ وجاء رجل فتصدق بصاع فقالوا: إنّ الله غني عن صدقة هذا فنزل.
quran:16:23

Assuredly, Allah knows what they conceal and what they declare. Indeed, He does not like the arrogant.  

Without doubt, verily, God knows what they keep secret and what they disclose, and will requite them for it. Indeed He does not love the arrogant, meaning, He will punish them.
القرآن:١٦:٢٣

لَا جَرَمَ أَنَّ اللَّهَ يَعْلَمُ مَا يُسِرُّونَ وَمَا يُعْلِنُونَ ۚ إِنَّهُ لَا يُحِبُّ الْمُسْتَكْبِرِينَ  

{لا جرم} حقا {أن الله يعلم ما يسرون وما يعلنون} فيجازيهم بذلك {إنه لا يحب المستكبرين} بمعنى أنه يعاقبهم.