Somerville was originally formed as a Town on March 25, 1863, within a portion of Bridgewater Township. Somerville was incorporated as a borough by an Act of the New Jersey Legislature on April 16, 1909, based on the results of a referendum held on May 4, 1909, at which point it was fully set off from Bridgewater Township.
As of the census of 2000, there were 12,423 people, 4,743 households, and 2,893 families residing in the borough. The population density was 5,262.4 people per square mile (2,032.4/km²). There were 4,882 housing units at an average density of 2,068.0/sq mi (798.7/km²). The racial makeup of the borough was 71.21% White, 12.93% African American, 0.19% Native American, 7.35% Asian, 0.02% Pacific Islander, 5.10% from other races, and 3.20% from two or more races. Hispanic or Latino of any race were 17.00% of the population.
There were 4,743 households out of which 28.6% had children under the age of 18 living with them, 44.5% were married couples living together, 11.9% had a female householder with no husband present, and 39.0% were non-families. 31.4% of all households were made up of individuals and 11.2% had someone living alone who was 65 years of age or older. The average household size was 2.49 and the average family size was 3.15.
In the borough the population was spread out with 21.9% under the age of 18, 9.0% from 18 to 24, 35.8% from 25 to 44, 19.3% from 45 to 64, and 14.0% who were 65 years of age or older. The median age was 36 years. For every 100 females there were 101.2 males. For every 100 females age 18 and over, there were 99.1 males.
The median income for a household in the borough was $51,237, and the median income for a family was $60,422. Males had a median income of $40,585 versus $32,697 for females. The per capita income for the borough was $23,310. About 4.8% of families and 7.7% of the population were below the poverty line, including 10.7% of those under age 18 and 8.6% of those age 65 or over.
The Somerville train station offers service on New Jersey Transit's Raritan Valley Line, with frequent service to Newark Penn Station, with connecting service to Penn Station New York in Midtown Manhattan.
U.S. Route 22 runs along the northern boundary of Somerville and offers connections to the state highway network.
U.S. Route 206 runs along the western boundary of Somerville, via the Somerville Circle, and provides north/south connections to nearby towns.
The closest airport with scheduled service is Newark Liberty International Airport.