Al-Baqarah - 2:271

إِن تُبْدُواْ الصَّدَقَاتِ فَنِعِمَّا هِيَ وَإِن تُخْفُوهَا وَتُؤْتُوهَا الْفُقَرَاء فَهُوَ خَيْرٌ لُّكُمْ وَيُكَفِّرُ عَنكُم مِّن سَيِّئَاتِكُمْ وَاللّهُ بِمَا تَعْمَلُونَ خَبِيرٌ
[2:271]
If you give alms openly, it is well, and if you hide it and give it to the poor, it is better for you; and this will do away with some of your evil deeds; and Allah is aware of what you do.
If ye disclose (acts of) charity, even so it is well, but if ye conceal them, and make them reach those (really) in need, that is best for you: It will remove from you some of your (stains of) evil. And Allah is well acquainted with what ye do.
If ye publish your almsgiving, it is well, but if ye hide it and give it to the poor, it will be better for you, and will atone for some of your ill-deeds. Allah is Informed of what ye do.