John testifies concerning him. He cries out, saying, "This was him of whom I said, 'He who comes after me has surpassed me because he was before me.'"
This verse raises a question of tenses. John 'testifies' not 'testified' (martyrei). This is not an error of translation of the NIV as far as I can tell and it implies that John had access to the written synoptic Gospels when he wrote his own, for the Baptist was long ago murdered by Herod. As today, it's 'Scripture Speaks' not 'scripture has spoken'.
Then we have the question of who came first. We don't have the same reverence for seniority that Eastern cultures do. We have no difficulty is asserting that Johann Strauss fils is a better composer than Johann Strauss pere, or that Queen Elizabeth the First was an incomparably better monarch than her older sister Mary Tudor.
The Baptist was an older cousin of Jesus and Jesus showed him due respect. He called him 'more than a prophet'; there was 'among those born of women no-one greater than John'. (Luke 7:26-28) But John witnessed to the fact that Jesus was before him because as the second person of the Trinity he had always existed.