Cranbury is a township in southern Middlesex County, within the U.S. state of New Jersey, Located within the Raritan Valley region, Cranbury is roughly equidistant between New York City and Philadelphia in the heart of the state. As of the 2020 United States census, the township's population was 3,842, a decrease of 15 (−0.4%) from the 2010 census count of 3,857, which in turn had reflected an increase of 630 (+19.5%) from the 3,227 counted at the 2000 census. Cranbury has become a hub in central New Jersey for the logistics industry, and the municipal taxes generated by these industrial properties have helped to keep residential property taxes steady over time.
A deed for a sale of land and improvements dated March 1, 1698, is the earliest evidence of buildings constructed in present-day Cranbury. A home in Cranbury was used by Alexander Hamilton and the Marquis de Lafayette as a headquarters during the A