It was founded in 1797 during the reign of King Rama I. It used to be a small city. It begun to expand in the 1900s, when a railway connecting it to Bangkok was completed.
↑"รายงานสถิติจำนวนประชากรและบ้านประจำปี พ.ศ.2562" [Statistics, population and house statistics for the year 2019]. Registration Office Department of the Interior, Ministry of the Interior (in Thai). 31 December 2019. Archived from the original on 14 June 2019. Retrieved 10 March 2020, archiving is not necessary because DOPA provides data from 1993 to future years.{{cite web}}: CS1 maint: postscript (link)