ENOfficial
It was narrated from Abu Hurairah that the Prophet (ﷺ) said: "Allah, the Most High, has forgiven my Ummah for whatever enters the mind, so long as it is not spoken of or put into action."
Source: sunnah.com
Other translations
Arabic
أَخْبَرَنِي مُوسَى بْنُ عَبْدِ الرَّحْمَنِ، قَالَ حَدَّثَنَا حُسَيْنٌ الْجُعْفِيُّ، عَنْ زَائِدَةَ، عَنْ شَيْبَانَ، عَنْ قَتَادَةَ، عَنْ زُرَارَةَ بْنِ أَوْفَى، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " إِنَّ اللَّهَ تَعَالَى تَجَاوَزَ لأُمَّتِي عَمَّا حَدَّثَتْ بِهِ أَنْفُسَهَا مَا لَمْ تَكَلَّمْ أَوْ تَعْمَلْ بِهِ " .
sunnah.com