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 2006 and 2011 censuses for Khansar show changes in its population and household numbers.