To give charity publicly is good, but to give to the poor privately is better for you, and will absolve you of your sins. And Allah is All-Aware of what you do. You are not responsible for people’s guidance (Muhammad) —it is Allah Who guides whoever He wills. Whatever you give in charity is certainly well known to Allah. Those who spend their wealth in charity day and night, secretly and openly—their reward is with their Lord, and there will be no fear for them, nor will they grieve.
—Quran 2:271-274
Those who believe, and do good deeds, and pray regularly, and give charity—they will have their reward with their Lord; they will have no fear, nor shall they grieve.
―Quran 2:277
وَالصَّدَقَةُ تُطْفِئُ الْخَطِيئَةَ كَمَا يُطْفِئُ الْمَاءُ النَّارَ
“Charity (Sadaqah) extinguishes sin, just as water extinguishes fire.”
―Prophet Muhammad. peace be upon him.
Reference: Jami` at-Tirmidhi » The Book on Traveling » Hadith 71
-note: giving Charity is the third pillar of Islam.