The Quran was revealed over about 23 years, roughly 13 in Makkah and 10 in Madinah, but it is arranged in the mushaf in a different order. This animation shows the 114 surahs in their mushaf positions, sized by number of ayahs, and fills them in the traditional order of revelation, starting with Al-Alaq.
Watch how the early Meccan revelations land mostly in the short surahs at the end of the mushaf, and how the long surahs at the front, such as Al-Baqarah, Al Imran and An-Nisa, fill in during the Madinan period.
The order used is the surah-level chronology of the Egyptian standard edition. Many surahs were revealed in parts over several years, so the animation and the approximate years are an illustration, not a precise dating of individual ayahs.