At the 2006 National Census, Khansar's population was 20,490 in 6,019 households. The following census in 2011 counted 21,338 people in 6,655 households.
The provided data shows the population of Khansar over time, with a slight increase between 2006 and 2011.