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.
bayhaqi:5875Abū al-Ḥasan Muḥammad b. al-Ḥusayn al-ʿAlawī Imlāʾ > ʿAbdullāh b. Muḥammad b. al-Ḥasan al-Sharqī > Muḥammad b. Yaḥyá al-Dhuhlī > ʿAbd al-Raḥman b. Mahdī > ʿAbdullāh b. al-Mubārak > Maʿmar > Hammām b. Munabbih > Abū Hurayrah

[Machine] Narrated by the Prophet ﷺ , the good word is a form of charity, and walking to the mosque is a form of charity. This was also narrated by Abdur-Razzaq from Ma'mar, who said in the narration: Every step taken towards the prayer is a form of charity. They both compiled it in Sahih Al-Bukhari and Sahih Muslim, and it is mentioned in the last chapter of the book of Zakat, with the will of Allah.  

البيهقي:٥٨٧٥حَدَّثَنَا أَبُو الْحَسَنِ مُحَمَّدُ بْنُ الْحُسَيْنِ الْعَلَوِيُّ إِمْلَاءً أنبأ عَبْدُ اللهِ بْنُ مُحَمَّدِ بْنِ الْحَسَنِ الشَّرْقِيُّ ثنا مُحَمَّدُ بْنُ يَحْيَى الذُّهْلِيُّ ثنا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ عَنْ عَبْدِ اللهِ بْنِ الْمُبَارَكِ عَنْ مَعْمَرٍ عَنْ هَمَّامِ بْنِ مُنَبِّهٍ عَنْ أَبِي هُرَيْرَةَ

عَنِ النَّبِيِّ ﷺ قَالَ الْكَلِمَةُ الطَّيِّبَةُ صَدَقَةٌ وَمَشْيُكَ إِلَى الْمَسْجِدِ صَدَقَةٌ وَرَوَاهُ عَبْدُ الرَّزَّاقِ عَنْ مَعْمَرٍ فَقَالَ فِي الْحَدِيثِ وَكُلُّ خُطْوَةٍ يَمْشِيهَا إِلَى الصَّلَاةِ صَدَقَةٌ وَمِنْ ذَلِكَ الْوَجْهِ أَخْرَجَاهُ فِي الصَّحِيحَيْنِ وَهُوَ مُخَرَّجٌ فِي آخِرِ كِتَابِ الزَّكَاةِ بِمَشِيئَةِ اللهِ