Founded by Danish-Americans, the city is named after the Danishcity of Viborg. The area was first settled by Danish migrants in the 1860s, founding a community known as Daneville. With the advent of the railway in 1893, a new settlement closer to the railway was created as Viborg. Viborg was incorporated as a city on August 25, 1903.
As of the census of 2010, there were 782 people, 360 households, and 189 families living in the city. The population density was. There were 429 housing units at an average density of. The racial makeup of the city was 98.6% White, 0.8% Native American, and 0.6% from two or more races. Hispanic or Latino of any race were 0.6% of the population. There were 360 households of which 21.1% had children under the age of 18 living with them, 39.7% were married couplesliving together, 9.2% had a female householder with no husband present, 3.6% had a male householder with no wife present, and 47.5% were non-families. 43.6% of all households were made up of individuals and 21.9% had someone living alone who was 65 years of age or older. The average household size was 1.98 and the average family size was 2.69. The median age in the city was 51.3 years. 18.9% of residents were under the age of 18; 6.7% were between the ages of 18 and 24; 16.9% were from 25 to 44; 24.9% were from 45 to 64; and 32.5% were 65 years of age or older. The gender makeup of the city was 46.2% male and 53.8% female.
At the 2000 census, there were 832 people, 366 households and 211 families living in the city. The population density was 2,147.1 per square mile. There were 403 housing units at an average density of 1,040.0 per square mile. The racial makeup of the city was 99.40% White, 0.24% Native American, 0.12% Asian, and 0.24% from two or more races. Hispanic or Latino of any race were 0.12% of the population. There were 366 households of which 22.7% had children under the age of 18 living with them, 48.9% were married couples living together, 6.0% had a female householder with no husband present, and 42.1% were non-families. 39.6% of all households were made up of individuals and 24.3% had someone living alone who was 65 years of age or older. The average household size was 2.11 and the average family size was 2.85. 20.0% of the population were under the age of 18, 6.6% from 18 to 24, 20.3% from 25 to 44, 18.4% from 45 to 64, and 34.7% who were 65 years of age or older. The median age was 47 years. For every 100 females, there were 79.3 males. For every 100 females age 18 and over, there were 76.2 males. The median household income was $29,231 and the median family income was $39,327. Males had a median income of $27,337 versus $20,625 for females. The per capita income for the city was $17,738. About 5.2% of families and 6.4% of the population were below the poverty line, including 3.2% of those under age 18 and 10.5% of those age 65 or over.