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:67:13

And conceal your speech or publicize it; indeed, He is Knowing of that within the breasts.  

And ˹whether you˺ keep secret, O people, your speech or proclaim it, He indeed, exalted be He, is Knower of what is in the breasts, of what they contain: so how much more so ˹is He Knower˺ in the case of what you utter ˹openly˺ — the reason for the revelation of this ˹verse˺ was that the idolaters said to one another: ‘Speak secretly, and Muhammad’s god will not hear you’.
القرآن:٦٧:١٣

وَأَسِرُّوا قَوْلَكُمْ أَوِ اجْهَرُوا بِهِ ۖ إِنَّهُ عَلِيمٌ بِذَاتِ الصُّدُورِ  

{وأسِرّوا} أيها الناس {قولكم أو اجهروا به إنه} تعالى {عليم بذات الصدور} بما فيها فكيف بما نطقتم به، وسبب نزول ذلك أن المشركين قال بعضهم لبعض: أسرّوا قولكم لا يسمعكم إله محمد.