Sahih al-Bukhari, Book 66, Hadith 25 (Bukhari 4796)

Narrated Qatada:

I asked Anas bin Malik: "Who collected the Qur'an at the time of the Prophet (ﷺ) ?" He replied, "Four, all of whom were from the Ansar: Ubai bin Ka`b, Mu`adh bin Jabal, Zaid bin Thabit and Abu Zaid."