The first known European to explore and write about the area was Martin Pring in 1603. The Piscataqua River is a tidal estuary with a swift current, but forms a good natural harbor. The west bank of the harbor was settled by European colonists in 1630 and named Strawbery Banke, after the many wild strawberries growing there. The village was protected by Fort William and Mary on what is now New Castle Island. Strategically located for trade between upstream industries and mercantile interests abroad, the port prospered. Fishing, lumber and shipbuilding were principal businesses of the region.<ref name=cool>Template:Cite book</ref> Enslaved Africans were imported as laborers as early as 1645 and were integral to building the city's prosperity.<ref name=ring>Template:Cite web</ref> Portsmouth was part of the Triangle Trade, which made significant profits from slavery.
At the town's incorporation in 1653, it was named "Portsmouth" in honor of the colony's founder, John Mason. He had been captain of the English port of Portsmouth, Hampshire, after which New Hampshire is named. Richard Martyn was one of the founders of the first church in Portsmouth, and served as Selectman, Representative to the General Court, Speaker of the House, and Chief Justice.
In 1774, in the lead-up to the Revolution, Paul Revere rode to Portsmouth warning that the BritishRoyal Navy was coming to capture the port.<ref>Template:Cite web</ref> Although Fort William and Mary protected the harbor, the Patriot government moved the capital inland to Exeter, which ensured that it would be under no threat from the Royal Navy, which bombarded Falmouth (now Portland, Maine) instead on October 18, 1775. Portsmouth was the destination for several of Beaumarchais's ships containing materiel, such as artillery, tents, and gunpowder, to help the American revolutionary effort.<ref>Template:Cite web</ref> African Americans helped defend Portsmouth and New England during the war. In 1779, 19 enslaved African Americans from Portsmouth wrote a petition to the state legislature and asked that it abolish slavery, in recognition of their war contributions and in keeping with the principles of the Revolution.<ref name=ring /> The legislature tabled their petition. New Hampshire abolished slavery in 1857, by which time the institution was effectively extinct in the state.
Thomas Jefferson's 1807 embargo against American trade with Britain severely disrupted New England's trade with Canada, and several local businessmen went bankrupt. Portsmouth was host to numerous privateers during the War of 1812. In 1849, Portsmouth was incorporated as a city.<ref name=cool />
Once one of the nation's busiest ports and shipbuilding cities, Portsmouth expressed its wealth in fine architecture. It has significant examples of Colonial, Georgian, and Federal style houses, some of which are now museums. Portsmouth's heart has stately brick Federalist stores and townhouses, built all-of-a-piece after devastating early 19th-century fires. The worst was in 1813 when 244 buildings burned.<ref name=cool /> A fire district was created that required all new buildings within its boundaries to be built of brick with slate roofs; this created the downtown's distinctive appearance. The city was also noted for the production of boldly wood-veneered federal-style (neoclassical) furniture, particularly by the master cabinet maker Langley Boardman.
In the 20th century, the city founded a Historic District Commission, which has worked to protect much of the city's irreplaceable architectural legacy. In 2008, the National Trust for Historic Preservation named Portsmouth one of the "Dozen Distinctive Destinations".<ref>Template:Cite web</ref> The compact and walkable downtown on the waterfront draws tourists and artists, who each summer throng the cafes, restaurants and shops around Market Square. Portsmouth annually celebrates the revitalization of its downtown (in particular Market Square) with Market Square Day,<ref>What is Market Square Day?</ref> a celebration dating back to 1977, produced by the non-profit Pro Portsmouth, Inc.
This emphasis on historic preservation and revitalization was the result of much pain and destruction. Portsmouth is largely walkable due to its network of streets and tight blocks filled with preserved Revolution-era homes. However, like many other cities all over the region (and nation), Portsmouth was hit by Urban Renewal, a planning tool used nationwide to provide Federal funds to address “urban blight” and revitalize downtown cores after decades of suburbanization and loss of tax revenue. An urban renewal district for Portsmouth was its North End neighborhood, which similar to Boston’s, was home to an Italian-American population.<ref name="URBAN RENEWAL PORTSMOUTH NH">Template:Cite web</ref>
In 1964, federal funds were allocated to the North End project area in Portsmouth, for urban renewal. Prior to redevelopment, the North End was a mix of residential and commercial buildings, with many older houses converted into storefronts with apartments above. In the mid-1960s, the area was considered overcrowded, run down, and a fire hazard. As a result, the Portsmouth Housing Authority proposed the destruction of approximately 200 buildings, a school, and a church and redevelopment for commercial, industrial, and public use, rather than for residences. The project would displace approximately 300 families as a result. In 1968, Portsmouth Preservation Inc., a preservation organization was formed to attempt to save some of the historic building stock in the area slated for redevelopment. After bitter fighting and preservation advocacy, just fourteen houses were saved and mostly moved to an area known today as “The Hill”.<ref name="URBAN RENEWAL PORTSMOUTH NH"/> This preservation was only the beginning, and eventually efforts conspired to created the afformentioned historic district. Urban renewal was many events that led to its creation.
Portsmouth shipbuilding history has had a long symbiotic relationship with Kittery, Maine, across the Piscataqua River. In 1781–1782, the naval hero John Paul Jones lived in Portsmouth while he supervised construction of his ship Ranger, which was built on nearby Badger's Island in Kittery. During that time, he boarded at the Captain Gregory Purcell house, which now bears Jones' name, as it is the only surviving property in the United States associated with him. Built by the master housewright Hopestill Cheswell, an African American,<ref name="Black Portsmouth">Template:Cite book</ref> it has been designated as a National Historic Landmark. It now serves as the Portsmouth Historical Society Museum.
The Portsmouth Naval Shipyard, established in 1800 as the first federal navy yard, is on Seavey's Island in Kittery, Maine.<ref>Template:Cite web</ref> The base is famous for being the site of the 1905 signing of the Treaty of Portsmouth<ref>Template:Cite web</ref> which ended the Russo-Japanese War. Though US President Theodore Roosevelt orchestrated the peace conference that brought Russian and Japanese diplomats to Portsmouth and the Shipyard, he never came to Portsmouth, relying on the Navy and people of New Hampshire as the hosts. Roosevelt won the 1906 Nobel Peace Prize for his diplomacy in bringing about an end to the war.
There were 10,014 households, out of which 20.2% had children under the age of 18 living with them, 35.5% were headed by married couples living together, 8.3% had a female householder with no husband present, and 52.7% were non-families. 39.2% of all households were made up of individuals, and 11.8% were someone living alone who was 65 years of age or older. The average household size was 2.03, and the average family size was 2.75.<ref name="Census 2010 DP"/>
In the city, the population was spread out, with 16.6% under the age of 18, 7.7% from 18 to 24, 32.2% from 25 to 44, 27.6% from 45 to 64, and 15.9% who were 65 years of age or older. The median age was 40.3 years. For every 100 females, there were 94.2 males. For every 100 females age 18 and over, there were 92.6 males.<ref name="Census 2010 DP"/>
For the period 2010–2014, the city's estimated median annual household income was $67,679, and the median family income was $90,208. Male full-time workers had a median income of $58,441 versus $45,683 for females. The city's per capita income for the city was $42,724. About 4.0% of families and 7.6% of the population were below the poverty line, including 6.9% of those under age 18 and 7.1% of those age 65 or over.<ref>Template:Cite web</ref>
Heinemann USA is based in Portsmouth. Before its dissolution, Boston-Maine Airways (Pan Am Clipper Connection), a regional airline, was also headquartered in Portsmouth.<ref>Template:Cite web</ref>
Companies with headquarters in Portsmouth include packaged software producer Bottomline Technologies and frozen yogurt maker Sweet Scoops.
The Portsmouth Downtown Historic District encompasses the city's historic urban core and Market Square.<ref name=":0">Template:Cite web</ref> The city has a vibrant restaurant culture. In 2023, it was reported that the city had 36,000 restaurant seats for a population of 22,000.<ref>Template:Cite web</ref>
USS Albacore Museum & Park – a museum featuring the USS Albacore, a U.S. Navy submarine used for testing, which was decommissioned in 1972 and moved to the park in 1985. The submarine is open for tours.
Cabot Lyford four public sculptures – including "The Whale" and "My Mother the Wind," a seven-ton blank granite statue which was installed on Portsmouth's waterfront in 1975.<ref name="ppherald">Template:Cite news</ref>
New Hampshire Theatre Project – founded in 1986, a non-profit theater organization producing contemporary and classical works, and offering educational programs.<ref>Template:Cite web</ref>
North Church – historic church, the steeple of which is visible from most of Portsmouth
The Player's Ring Theater – a black-box theater that produces original work from local playwrights.
Pontine Theatre – produces original theater works based on the history, culture and literature of New England at their 50-seat black box venue.<ref>Template:Cite web</ref>
Portsmouth African Burying Ground – a memorial park and the only archeologically verified 18th-century African burying ground in New England.
Portsmouth Athenæum – a private membership library, museum and art gallery open to the public at certain times.
Portsmouth Harbor Lighthouse – first established in 1771, the current structure was built in 1878 and is open for monthly tours from May through September.
Portsmouth Historical Society – founded in 1917, includes museum galleries, a gift shop, welcome center, walking tours, and operates the John Paul Jones House.<ref>Template:Cite web</ref>
Prescott Park Arts Festival – summer entertainments in Portsmouth's waterfront park since 1974.<ref>Template:Cite web</ref>
Rockingham Hotel and the Library Restaurant – historic former hotel and contemporary restaurant. Built in 1885, it is a prominent early example of Colonial Revival architecture.
Seacoast Repertory Theatre – founded in 1988, a professional theater troupe.<ref>Template:Cite web</ref>
Strawbery Banke Museum – a neighborhood featuring several dozen restored historic homes in Colonial, Georgian and Federal styles of architecture. The site of one of Portsmouth's earliest settlements.
Freedom Rugby Football Club is a men's rugby union team based in Portsmouth, founded in the summer of 2014. The club is an active member of USA Rugby and New England Rugby Football Union (NERFU).
The city of Portsmouth operates under a council-manager system of government. Portsmouth elects a nine-member at-large City Council to serve as the city's primary legislative body.<ref>Template:Cite webTemplate:Dead link</ref> The candidate who receives the most votes is designated the Mayor (currently Deaglan McEachern), while the candidate receiving the second-highest vote total is designated the Assistant Mayor (currently Joanna Kelley). While the mayor and council convene to establish municipal policy, the City Manager (currently Karen Conard) oversees the city's day-to-day operations.<ref>Template:Cite web</ref>
Portsmouth city vote by party in presidential elections<ref name="auto">Template:Cite web</ref>
In March 2014, Portsmouth became the first municipality in New Hampshire to implement protections for city employees from discrimination on the basis of gender identity, by a 9–0 vote of the city council.<ref>Template:Cite web</ref>