Short answer
Congratulate the parents warmly and make dua for the child, in any good words. There is no fixed wording from the Prophet ﷺ. A well-known phrase from the early scholars is "Barakallahu laka fil mawhubi lak": may Allah bless you in the one He has given you. The four schools agree it is recommended.
Congratulating parents on a birth is mustahabb, and so is making dua for the child. Any good words are acceptable. Avoid words that show disappointment at a girl or that carry wrong beliefs.
The four schools agree on this.
Explanation
The Quran describes the angels bringing "good tidings" of a child to Ibrahim and to Zakariyya. A birth is good news, and sharing in it strengthens family ties. The Prophet ﷺ himself made dua for babies brought to him and gave them names and tahnik.
Words you can use:
- Barakallahu laka fil mawhubi lak, wa shakartal wahib, wa balagha ashuddahu, wa ruziqta birrah. May Allah bless you in the one He has given you; may you thank the Giver; may the child reach maturity; and may you be granted his goodness. Imam al-Nawawi and other scholars record it from the early Muslims. It is a fine phrase, not a hadith of the Prophet ﷺ.
- Mabruk or Masha Allah, Barakallah, with a dua such as: may Allah make the child righteous and a coolness of your eyes.
- The parents may reply: Barakallahu laka wa jazakallahu khayran, or similar.
Good manners:
- Welcome a girl with the same joy as a boy. Dismay at a daughter is a habit the Quran condemns. See raising daughters.
- Visit briefly; the mother is recovering.
- A gift for the baby is a good sunnah of gift-giving. Mixing in customs such as a baby shower has its own rulings.
For more duas see dua for a new baby, and for the first days see what to do when a baby is born.
The evidence
Quran, Surah As-Saaffaat 37:101
فَبَشَّرْنَٰهُ بِغُلَٰمٍ حَلِيمٍۢ ﴿١٠١﴾
So We gave him good tidings of a forbearing boy.
A child is announced as good news.
Quran, Surah Maryam 19:7
يَٰزَكَرِيَّآ إِنَّا نُبَشِّرُكَ بِغُلَٰمٍ ٱسْمُهُۥ يَحْيَىٰ لَمْ نَجْعَل لَّهُۥ مِن قَبْلُ سَمِيًّۭا ﴿٧﴾
[He was told], "O Zechariah, indeed We give you good tidings of a boy whose name will be John. We have not assigned to any before [this] name."
Allah gave Zakariyya the good news of a son and his name.
Quran, Surah Al-Furqaan 25:74
وَٱلَّذِينَ يَقُولُونَ رَبَّنَا هَبْ لَنَا مِنْ أَزْوَٰجِنَا وَذُرِّيَّٰتِنَا قُرَّةَ أَعْيُنٍۢ وَٱجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا ﴿٧٤﴾
And those who say, "Our Lord, grant us from among our wives and offspring comfort to our eyes and make us an example for the righteous."
A Quranic dua that suits new parents.
Where the ruling is recorded
- al-Adhkar (Nawawi), Chapter on congratulating on a birth. Records that congratulating on a birth is recommended, with this phrase from the early Muslims.
Checked by our team. For a more accurate answer to your own situation, consult a scholar. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.