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:284

To Allah belongs whatever is in the heavens and whatever is in the earth. Whether you show what is within yourselves or conceal it, Allah will bring you to account for it. Then He will forgive whom He wills and punish whom He wills, and Allah is over all things competent.  

To God belongs all that is in the heavens and the earth. Whether you disclose, manifest, what is in your hearts or hide it, of evil and resolve for it, God shall take you to account for it, informing you of it on the Day of Resurrection. Then He will forgive whom He will, to forgive, and chastise whom He will, to chastise (both verbs are apocopated ˹fa-yaghfir, ‘he will forgive’, wa-yu‘adhdhib, ‘he will chastise’˺ if taken as the responses to the conditional, in tubdū, ‘if you proclaim’; but they may also be read with a final nominative inflection ˹yaghfiru, yu‘adhdhibu˺ in which case, it would ˹constitute a new clause and˺ follow on from an implicit fahuwa, ‘then He’). And God has power over all things, including reckoning with you and requiting you.
القرآن:٢:٢٨٤

لِلَّهِ مَا فِي السَّمَاوَاتِ وَمَا فِي الْأَرْضِ ۗ وَإِنْ تُبْدُوا مَا فِي أَنْفُسِكُمْ أَوْ تُخْفُوهُ يُحَاسِبْكُمْ بِهِ اللَّهُ ۖ فَيَغْفِرُ لِمَنْ يَشَاءُ وَيُعَذِّبُ مَنْ يَشَاءُ ۗ وَاللَّهُ عَلَىٰ كُلِّ شَيْءٍ قَدِيرٌ  

{لله ما في السماوات وما في الأرض وإن تبدوا} تظهروا {ما في أنفسكم} من السوء والعزم عليه {أو تخفوه} تسروه {يحاسبكم} يخبركم {به الله} يوم القيامة {فيغفرْ لمن يشاء} المغفرة له {ويعذبْ من يشاء} تعذيبه والفعلان بالجزم عطف على جواب الشرط والرفع أي فهو {والله على كل شيء قدير} ومنه محاسبتكم وجزاؤكم.