Some 81 primary schools had too many pupils as of September 2020, along with 47 secondaries.
Another 305 schools were operating at capacities of between 90 and 100 per cent.
In Edinburgh, 30 per cent of secondary schools were over capacity, and the same was true of a quarter of secondaries in Glasgow.
At the primary level, 18 schools in North Lanarkshire (15 per cent) fell into the category, along with 14 in South Lanarkshire (11 per cent).
Across Scotland, 13 per cent of secondary schools were over capacity and four per cent of primaries.
The SNP came to power in 2007 with a promise to cut primary class sizes.
Pamela Nash, chief executive of pro-UK campaign group Scotland in Union, highlighted the official figures, which were published last year.
She said: “The SNP says that education is the top priority for the government, but the reality is different as the SNP has been distracted by its obsession with the constitution.
“There have been broken promises about class sizes, the attainment gap has not been closed, we have fallen down the international rankings, and councils have faced steep funding cuts – while the money available to the Government has actually increased.”
Ms Nash added: “The responsibility for local spending cuts lies squarely with the SNP Government in Edinburgh and there are further cuts down the line this year."
A Scottish Government spokesman said: “School buildings across Scotland are in their best condition since recorded figures began.
"According to the latest statistics 90 per cent of schools were in good or satisfactory condition in April 2021, up from 61 per cent in April 2007.
“There is much still to do. Our £2 billion programme of investment in schools, delivered in partnership with local authorities, will benefit 50,000 pupils across Scotland.
“Phase three of the programme will open next year providing councils with an opportunity to consider learning estate priorities for their area.
"The Scottish Government and Scottish Futures Trust are in detailed discussions with local authorities to agree the Learning Estate Investment Programme’s development timeline for 2022."