The Prophet ﷺ said, "There shall come out of the Fire whoever said, 'There is no god but Allah,' and had in his heart the weight of a barley grain of goodness. And there shall come out of the Fire whoever said, 'There is no god but Allah,' and had in his heart the weight of a wheat grain of goodness. And there shall come out of the Fire whoever said, 'There is no god but Allah,' and had in his heart the weight of an atom of goodness."
عن النبي ﷺ قال: يخرج من النار من قال: لا إله إلا الله، وفي قلبه وزن شعيرة من خير، ويخرج من النار من قال: لا إله إلا الله، وفي قلبه وزن برة من خير، ويخرج من النار من قال: لا إله إلا الله وفي قلبه وزن ذرة من خير.
Bukhari narrated it in the Book of Faith (44), and Muslim in the Book of Faith (193:325), both from the hadith of Hisham, the companion of Dastawai, who said, Qatada narrated to us, from Anas, and he related it. The wording given is that of Bukhari, and Muslim's wording is close to it.