اِنْ تُبْدُوا الصَّدَقٰتِ فَنِعِمَّا هِيَۚ وَاِنْ تُخْفُوْهَا وَتُؤْتُوْهَا الْفُقَرَاۤءَ فَهُوَ خَيْرٌ لَّكُمْ ۗ وَيُكَفِّرُ عَنْكُمْ مِّنْ سَيِّاٰتِكُمْ ۗ وَاللّٰهُ بِمَا تَعْمَلُوْنَ خَبِيْرٌ ( البقرة: ٢٧١ )
In tubdus sadaqaati fani'immaa hiya wa in tukhfoohaa wa tu'toohal fuqaraaa'a fahuwa khayrul lakum; wa yukaffiru 'ankum min saiyi aatikum; wallaahu bimaa ta'maloona Khabeer (al-Baq̈arah 2:271)
If you disclose your charitable expenditures, they are good; but if you conceal them and give them to the poor, it is better for you, and He will remove from you some of your misdeeds [thereby]. And Allah, of what you do, is [fully] Aware. (Al-Baqarah  : 271)
1 Mufti Taqi Usmani
If you make Sadaqāt (alms) openly, it is good enough, and if you keep it secret and give it to the needy, it is much better for you, and this will write off part of your sins. Allah is All-Aware of what you do.