Philadelphia is the largest city in the Commonwealth of Pennsylvania, the second largest city on the East Coast of the United States, and the fifth-most-populous city in the United States. It is located in the Northeastern United States at the confluence of the Delaware and Schuylkill rivers, and it is the only consolidated city-county in Pennsylvania. As of the , the city had a population of 1,526,006, growing to 1,547,607 in 2012 by Census estimates. Philadelphia is the economic and cultural center of the , home to over 6 million people and the country's sixth-largest metropolitan area. Within the Delaware Valley, the Philadelphia metropolitan division consists of five counties in Pennsylvania and has a population of 4,008,994. Popular nicknames for Philadelphia are Philly and The City of Brotherly Love, the latter of which comes from the literal meaning of the city's name in Greek ( "brotherly love", compounded from philos (φίλος) "loving", and adelphos (ἀδελφός) "brother").
In 1682, William Penn founded the city to serve as capital of Pennsylvania Colony. By the 1750s, Philadelphia had surpassed Boston to become the largest city and busiest port in British America, and second in the British Empire, behind London. During the American Revolution, Philadelphia played an instrumental role as a meeting place for the Founding Fathers of the United States, who signed the Declaration of Independence in 1776 and the Constitution in 1787. Philadelphia was one of the nation's capitals during the Revolutionary War, and the city served as the temporary U.S. capital while Washington, D.C., was under construction. During the 19th century, Philadelphia became a major industrial center and railroad hub that grew from an influx of European immigrants. It became a prime destination for African Americans during the Great Migration and surpassed two million occupants by 1950.
Philadelphia is known for its arts and culture. The cheesesteak and soft pretzel are emblematic of Philadelphia cuisine, which is shaped by the city's ethnic mix. The city has more outdoor sculptures and murals than any other American city, and Philadelphia's Fairmount Park is the largest landscaped urban park in the world. Gentrification of Philadelphia's neighborhoods continues into the 21st century and the city has reversed its decades-long trend of population loss.
Before Europeans arrived, the Philadelphia area was home to the Lenape (Delaware) Indians in the village of Shackamaxon. Europeans came to the Delaware Valley in the early 17th century, with the first settlements founded by the Dutch, who in 1623 built Fort Nassau on the Delaware River opposite the Schuylkill River in what is now Brooklawn, New Jersey. The Dutch considered the entire Delaware River valley to be part of their New Netherland colony. In 1638, Swedish settlers led by renegade Dutch established the colony of New Sweden at Fort Christina (present day Wilmington, Delaware) and quickly spread out in the valley. In 1644, New Sweden supported the Susquehannocks in their military defeat of the English colony of Maryland. In 1648, the Dutch built Fort Beversreede on the west bank of the Delaware, south of the Schuylkill near the present-day Eastwick section of Philadelphia, to reassert their dominion over the area. The Swedes responded by building Fort Nya Korsholm, named New Korsholm after a town that is now in Finland. In 1655, a Dutch military campaign led by New Netherland Director-General Peter Stuyvesant took control of the Swedish colony, ending its claim to independence, although the Swedish and Finnish settlers continued to have their own militia, religion, and court, and to enjoy substantial autonomy under the Dutch. The English conquered the New Netherland colony in 1664, but the situation did not really change until 1682, when the area was included in William Penn's charter for Pennsylvania.
In 1681, in partial repayment of a debt, Charles II of England granted William Penn a charter for what would become the Pennsylvania colony. Despite the royal charter, Penn bought the land from the local Lenape to be on good terms with the Native Americans and ensure peace for his colony. According to legend Penn made a treaty of friendship with Lenape chief Tammany under an elm tree at Shackamaxon, in what is now the city's Fishtown section. Penn named the city Philadelphia, which is Greek for brotherly love (from philos, "love" or "friendship", and adelphos, "brother"). As a Quaker, Penn had experienced religious persecution and wanted his colony to be a place where anyone could worship freely. This tolerance, far more than afforded by most other colonies, led to better relations with the local Native tribes and fostered Philadelphia's rapid growth into America's most important city. Penn planned a city on the Delaware River to serve as a port and place for government. Hoping that Philadelphia would become more like an English rural town instead of a city, Penn laid out roads on a grid plan to keep houses and businesses spread far apart, with areas for gardens and orchards. The city's inhabitants did not follow Penn's plans, as they crowded by the Delaware River, the port, and subdivided and resold their lots. Before Penn left Philadelphia for the last time, he issued the Charter of 1701 establishing it as a city. It became an important trading center, poor at first, but with tolerable living conditions by the 1750s. Benjamin Franklin, a leading citizen, helped improve city services and founded new ones, such as fire protection, a library, and one of the American colonies' first hospitals.
Philadelphia's importance and central location in the colonies made it a natural center for America's revolutionaries. The city hosted the First Continental Congress before the war; the Second Continental Congress, which signed the United States Declaration of Independence, during the war; and the Constitutional Convention (1787) after the war. Several battles were fought in and near Philadelphia as well.
The state government left Philadelphia in 1799, and the federal government was moved to Washington, DC in 1800 with completion of the White House and Capitol. The city remained the young nation's largest with a population of nearly 50,000 at the turn of the 19th century; it was a financial and cultural center. Before 1800, its free black community founded the African Methodist Episcopal Church (AME), the first independent black denomination in the country, and the first black Episcopal Church. The free black community also established many schools for its children, with the help of Quakers. New York City soon surpassed Philadelphia in population, but with the construction of roads, canals, and railroads, Philadelphia became the first major industrial city in the United States.
Throughout the 19th century, Philadelphia had a variety of industries and businesses, the largest being textiles. Major corporations in the 19th and early 20th centuries included the Baldwin Locomotive Works, William Cramp and Sons Ship and Engine Building Company, and the Pennsylvania Railroad. Industry, along with the U.S. Centennial, was celebrated in 1876 with the Centennial Exposition, the first official World's Fair in the United States. Immigrants, mostly Irish and German, settled in Philadelphia and the surrounding districts. The rise in population of the surrounding districts helped lead to the Act of Consolidation of 1854, which extended the city limits of Philadelphia from the 2 square miles of present-day Center City to the roughly 130 square miles of Philadelphia County. These immigrants were largely responsible for the first general strike in North America in 1835, in which workers in the city won the ten-hour workday. The city was a destination for thousands of Irish immigrants fleeing the Great Famine in the 1840s; housing for them was developed south of South Street, and was later occupied by succeeding immigrants. They established a network of Catholic churches and schools, and dominated the Catholic clergy for decades. Anti-Irish, anti-Catholic Nativist riots had erupted in Philadelphia in 1844. In the latter half of the century, immigrants from Russia, Eastern Europe and Italy; and African Americans from the southern U.S. settled in the city. Between 1880 and 1930, the African-American population of Philadelphia increased from 31,699 to 219,559. Twentieth-century black newcomers were part of the Great Migration out of the rural South to northern and midwestern industrial cities.
In 1940, non-Hispanic whites constituted 86.8% of the city's population. The population peaked at more than two million residents in 1950, then began to decline with the restructuring of industry, which led to the loss of many middle-class union jobs. In addition, suburbanization had been drawing off many of the wealthier residents to outlying railroad commuting towns and newer housing. Revitalization and gentrification of neighborhoods began in the late 1970s and continues into the 21st century, with much of the development in the Center City and University City areas of the city. After many of the old manufacturers and businesses left Philadelphia or shut down, the city started attracting service businesses and began to more aggressively market itself as a tourist destination. Glass-and-granite skyscrapers were built in Center City. Historic areas such as Independence National Historical Park located in Old City and Society Hill were renovated during the reformist mayoral era of the 1950s through the 1980s. They are now among the most desirable living areas of Center City. This has slowed the city's 40-year population decline after it lost nearly one-quarter of its population. The city has attracted more recent immigrants: Hispanics from Central and South America and Asian refugees from Laos, Vietnam and Cambodia. Educated Asians from India have tended to settle in suburbs with other middle- and upper-class people.