Figures released by the Scottish Council of Independent Schools show that numbers have held up since the abolition of the assisted places scheme five years ago, which at the time was considered a major threat to the viability of many schools.
In 1997, 31,756 pupils were in the independent sector. Today's figure is lower at 31,483, but up on the previous three years. Over the past five years, the number of boarders has shrunk from 4,274 to 3,603 but numbers of day pupils - especially in the cities - have risen from 27,482 to 27,880.
Judith Sischy, SCIS director, said: "It is a considerable achievement for the independent schools to have increased their pupil numbers against a declining population in Scotland. For a small sector, the schools make a significant contribution to education.
"The independent sector has established a high reputation across Scotland.
Parents feel that they are making a good investment when they choose an independent school for their child. They value the high standard of teaching, the wide range of enrichment opportunities and the individual support given to pupils."
Scotland's 74 independent schools account for just 4 per cent of the total pupil population. In Edinburgh, 23.4 per cent of secondary pupils are in the private sector. In Glasgow, the figure is only 11.7 per cent but in Perth and Kinross 14.7 per cent and in Aberdeen 13.7 per cent.
Annual fees range from pound;4,068 in primary to pound;6,290 in secondary and pound;17,955 for boarders.
The SCIS points out that parents value the high standard of education, small classes and individual attention, broad curriculum, wide range of extracurricular activities and good discipline.
More parents are said to be enquiring about boarding since the start of session after "a notable investment by boarding schools in their residential and other facilities".