Compare Joh 1:2, and the pronoun ἐκεῖνος, he, in Joh 1:8.
For a witness (εἰς μαρτυρίαν)
Revised version of the New Testament, more correctly, for witness: a witness would be, μάρτυρα as Act 1:8. The sense is for witness-bearing or to bear witness. On the word, see Act 1:22; 1Pe 5:1. It is one of John's characteristic words, occurring nearly fifty times in various forms in his Gospel, and thirty or forty times in the Epistles and Revelation. The emphatic development of the idea of witness is peculiar to this Gospel. “It evidently belongs to a time when men had begun to reason about the faith, and to analyze the grounds on which it rested” (Westcott). He develops the idea under the following forms: The witness of the Father (Joh 5:31, Joh 5:34, Joh 5:37); the witness of Christ himself (Joh 8:14; Joh 18:37); the witness of works (Joh 5:17, Joh 5:36; Joh 10:25; Joh 14:11; Joh 15:24); the witness of Scripture (Joh 5:39, Joh 5:40, Joh 5:46; Joh 1:46); the witness of the forerunner (Joh 1:7; Joh 5:33, Joh 5:35); the witness of the disciples (Joh 15:27; Joh 19:35; Joh 21:24; 1Jo 1:2; 1Jo 4:14); the witness of the Spirit (Joh 15:26; Joh 16:13, Joh 16:14; 1Jo 5:6). Note the emphasis attached to the idea here, by the twofold form in which it is put: first, generally, for witness, and then by giving the subject of the testimony.
The Baptist took up the work of the prophets, as respects their preparation for the universal extension of the divine call (Isa 49:6). His message was to men, without regard to nation, sect, descent, or other considerations.