The Holy Quran 2:271 — Surah Al-Baqarah
Arabic text
إِن تُبْدُوا۟ ٱلصَّدَقَـٰتِ فَنِعِمَّا هِىَ ۖ وَإِن تُخْفُوهَا وَتُؤْتُوهَا ٱلْفُقَرَآءَ فَهُوَ خَيْرٌ لَّكُمْ ۚ وَيُكَفِّرُ عَنكُم مِّن سَيِّـَٔاتِكُمْ ۗ وَٱللَّهُ بِمَا تَعْمَلُونَ خَبِيرٌ
Translation
If you make your charity apparent (public), then this is good (if your intention is not to show off), but if you secretly give it to the poor, it will be better for you (and for the recipient because he will not be embarrassed) and it will remove some of your sins. Allaah is Informed of what you do (regardless of whether your actions are open or secret).
Tafsir (excerpt) — Tafsir Usmani
If there is no intention of showing off to people, then giving charity in front of people is also good, so that others too may feel eagerness and desire for it; and giving charity secretly is also good, so that the recipient is not embarrassed.
Preview. The full text opens with JavaScript enabled.