There is much speculation about the identities of the two witnesses.**
I believe the two witnesses are Moses and Elijah and here is the reasoning:
We know that Moses and Elijah appeared on the Mount of Transfiguration to talk with Jesus: Suddenly Moses and Elijah appeared before them, talking with Jesus. --- Matthew 17:3
I believe they were consulting with Jesus about his upcoming crucifixion. After the consultation, I believe we see them at the tomb and at the resurrection.
Let me explain.
In Luke, we get this description at the tomb:
...early in the morning, the women came to the tomb,....found the stone rolled away from the tomb, but ...did not find the body of the Lord Jesus. While they were puzzling over this, suddenly two men in radiant apparel stood beside them.
--- Luke 24:1-4
Who are these 2 men in "radiant apparel?"
The Bible does not say and it is speculation on my part, but I believe they are Moses and Elijah in radiant resurrection bodies. The NIV Bible version translation says: "two men in clothes that gleamed like lightning."
And immediately after the ascension of Jesus we read: And as they were gazing intently into the sky while He was going, behold, two men in white clothing stood beside them. 11 They also said, "Men of Galilee, why do you stand looking into the sky? This Jesus, who has been taken up from you into heaven, will come in just the same way as you have watched Him go into heaven."
--- Acts 1:9-10 NASB
I believe these two men at the tomb and at the ascension are Moses and Elijah. And when they appear again in the end times, they can claim to have been eyewitnesses to the resurrection and ascension of Jesus Christ.
And remember, "...Every fact is to be confirmed by the testimony of two or three witnesses."
2 Corinthians 13:1 NASB
That is, all scripture and foreshadowings of prohecy in the Bible are confirmed by at least one other Bible verse. Scripture confirms scripture.
Their testimony will fulfill the law of Moses in Deuteronomy 17:1 and will counter the false prophetic witness of the Antichrist and false prophet during the end times.