The phrase "the disciple whom Jesus loved" (ho mathētēs hon ēgapā ho Iēsous) or, in John 20:2; "the other disciple whom Jesus loved" (ton allon mathētēn hon ephilei ho Iēsous), is used six times in the Gospel of John, but in no other New Testament accounts of Jesus. John 21:24 states that the Gospel of John is based on the written testimony of this disciple.
Since the end of the first century, the beloved disciple has been commonly identified with John the Evangelist. Scholars have debated the authorship of Johannine literature (the Gospel of John, Epistles of John, and the Book of Revelation) since at least the third century, but especially since the Enlightenment. The authorship by John the Apostle is rejected by many modern scholars, but not entirely. There is a consensus among Johannine scholars that the beloved disciple was a real historical person, but there is no consensus on who the beloved disciple was.
The disciple whom Jesus loved is referred to, specifically, six times in the Gospel of John:
It is this disciple who, while reclining beside Jesus at the Last Supper, asks Jesus who it is that will betray him, after being requested by Peter to do so.
Later at the crucifixion, Jesus tells his mother, "Woman, here is your son", and to the beloved disciple he says, "Here is your mother."
When Mary Magdalene discovers the empty tomb, she runs to tell the beloved disciple and Peter. The two men rush to the empty tomb and the beloved disciple is the first to reach it. However, Peter is the first to enter.
In John 21, the last chapter of the Gospel of John, the beloved disciple is one of seven fishermen involved in the miraculous catch of 153 fish.
Also in the book's final chapter, after Jesus implies the manner in which Peter will die, Peter sees the beloved disciple following them and asks, "What about him?" Jesus answers, "If I want him to remain until I come, what is that to you? You follow Me."
Again in the Gospel's last chapter, it states that the very book itself is based on the written testimony of the disciple whom Jesus loved.