Short Answer: John the Baptist is known as Yahya, a prophet of Islam. He was born miraculously to two elderly parents, and his father was Prophet Zechariah, the uncle and protector of Mary, the mother of Jesus. Yahya lived a simple and ascetic life, devoted to the next world. He “baptized” people during his lifetime to spiritually cleanse them, much like the concept of wudu, but not in the way which baptism came to be known after Saul of Tarsus (Paul) spread his teachings. For Muslims, Prophet Yahya (peace be upon him) was a holy prophet of Allah, like all other prophets including Abraham, Moses, Jesus and Muhammad, peace be upon them all.
Peace be with you!
Thank you for your question and for contacting Ask About Islam.
Both the Quranic narrative of Prophet Yahya (peace be upon him) and the Biblical narrative of John the Baptist clearly point to the son of Prophet Zakariyya (peace be upon him), who lived during the time of Prophet Isa (or Jesus Christ), peace be upon him.
His Miraculous Birth
As Yahya was born of a barren mother and and an aged father (i.e Zakariyya), his birth is considered a miracle.
Zakariyya, in his old age, prayed to Allah to bless him with a son who would preach the Religion of God:
Now, behold, I am afraid of [what] my kinsfolk [will do] after I am gone, for my wife has always been barren. Bestow, then, upon me, out of Thy grace, the gift of a successor; who will be my heir as well as an heir [to the dignity] of the House of Jacob; and make him, O my Sustainer, well-pleasing to Thee! (Qur’an 19:5-6)
Allah Almighty accepted his prayer by granting him a son in the form of Prophet Yahya (peace be upon him):
Thereupon the angels called out unto him: “O Zachariah! We bring thee the glad tiding of [the birth of] a son whose name shall be John. [And God says,] ‘Never have We given this name to anyone before him.’ (Quran 19:7)
He Lived a Simple, Ascetic Life
Thus from the Quranic story of Prophet Yahya (peace be upon him), we understand that he was one of the noble prophets devoted to the work of leading people to the Way of Allah.
Among the prophets themselves he was noted for living the simplest of lives, thriving on wild fruits and honey and wearing a garment of camel hair.
He led a life of pure devotion in the wilderness, shunning worldly comforts.
Allah in His Qur’an says:
… [And when the son was born and grew up, he was told,] “O John! Hold fast unto the divine writ with [all thy] strength!” – for We granted him wisdom “while he was yet a little boy, as well as, by Our grace, [the gift of] compassion and purity; and he vv as [always] conscious of Us and full of piety towards his parents; and never was he haughty or rebellious. Hence, [God’s] peace was upon him on the day when he was born, and on the day of his death, and. will be [upon him] on the day when he shall be raised to life [again]. (Quran 19: 12-15)
John the “Baptist”?
Prophet Yahya (peace be upon him) is called John the Baptist in the gospels.
The Bible tells us how he exhorted the people to repent and return to God, calling them to the River Jordan to be immersed in water as a way of washing away their sins.
This is called baptism. The Qur’an does not speak of Yahya as a Baptist who called people to be baptized in River Jordan.
For Yahya and Jesus (peace and blessings be upon them) and their immediate followers Baptism was just a bath or ablution to purify themselves physically as well as spiritually.
The Church holds this ritual as central to the Christian faith in Jesus’ crucifixion and resurrection.
The gospel mentions Jesus as accepting baptism at the hands of John the Baptist, who is viewed chiefly as a foreteller of Jesus’ mission as the Lamb of God.
Obviously Islam has nothing to do with these beliefs and rejects them as doctrinal aberrations.
For Muslims, Prophet Yahya (peace be upon him) was a holy prophet of Allah, like all other prophets including Abraham, Moses, Jesus and Muhammad, peace be upon them all.
And Allah knows best.