Exporting contacts - more than 5,000

I’m trying to export a large number of contacts (around 12,000) but even though I select them all, the exported file only contains 5,000, like there’s a limit. Anyone know how to solve this? Thanks!