Philadelphia is established in the Colonial American Commonwealth of Pennsylvania.

Pennsylvania ( (listen) PEN-sl-VAY-nee-; Pennsylvania German: Pennsilfaani), officially the Commonwealth of Pennsylvania, is a state spanning the Mid-Atlantic, Northeastern, and Appalachian regions of the United States. It borders Delaware to the southeast, Maryland to the south, West Virginia to the southwest, Ohio to the west, Lake Erie and the Canadian province of Ontario to the northwest, New York to the north, and the Delaware River and New Jersey to the east.

Pennsylvania is the fifth-most populous state in the nation with over 13 million residents as of 2020. It is the 33rd-largest state by area and ranks ninth among all states in population density. Nearly 4.29 million residents are concentrated in the southeastern Delaware Valley metropolitan area, centered around Philadelphia, the state's largest and nation's sixth most populous city. Another 2.37 million reside in Greater Pittsburgh in the southwest, centered around Pittsburgh, the state's second-largest city and the largest in Western Pennsylvania. The subsequent five most populous cities are Allentown, Erie, Reading, Bethlehem, and Scranton. The state capital is Harrisburg.

Pennsylvania's geography is highly diverse: the Appalachian Mountains run through its center, while the Allegheny and Pocono Mountains span much of the northeast; close to 60% of the state is forested. While it has only 140 miles (225 km) of waterfront along Lake Erie and the Delaware River, Pennsylvania has more navigable rivers than any other state, including the Delaware, Ohio, and Pine Creek.

Pennsylvania was founded in 1681 through royal land grant to William Penn, son of the state's namesake; the southeast portion was once part of the colony of New Sweden. Established as a haven for religious and political tolerance, the Province of Pennsylvania was noteworthy for its relatively peaceful relations with native tribes, innovative government system, and religious pluralism. Pennsylvania was one of the thirteen British colonies from which the nation ultimately was formed.

Pennsylvania played a vital and historic role in the American Revolution and its quest for independence. Its largest city, Philadelphia, was the gathering place of the nation's Founding Fathers and home to much of the thinking, activism, and writing that inspired the American Revolution. Philadelphia hosted the First Continental Congress in Carpenters' Hall in 1774, and, beginning the following year, the Second Continental Congress in Independence Hall, which unanimously adopted the Declaration of Independence, a document that historian Joseph Ellis has described as "the most potent and consequential words in American history" and which formally launched the American Revolutionary War.In Philadelphia, the Second Continental Congress, on June 21, 1778, ratified the Articles of Confederation, which served as the foundation for the ultimate development and ratification of the U.S. Constitution; Pennsylvania became the second state (after Delaware, which had previously been part of Pennsylvania as the three lower counties) to ratify the Constitution on December 12, 1787. On eight separate occasions prior to the construction of Washington, D.C. as the nation's capital, a Pennsylvania city served as the nation's capital (Philadelphia from 1775 to 1776, 1777, twice in 1778, 1781, and 1790; York in 1777; and Lancaster in 1777).

During the American Civil War, Pennsylvania's 360,000 Union Army volunteers proved influential in strengthening the Union, successfully guarding the national capital of Washington, D.C. following the fall of Fort Sumter, and later leading daring raids against Confederate Army strongholds in the Deep South. The bloodiest battle of the Civil War with over 50,000 casualties, and one of the Union Army's most important victories, was fought on Pennsylvania soil at Gettysburg over three days in July 1863. Lincoln's 271-word address dedicating Gettysburg National Cemetery on November 19, 1863 remains one of the best known speeches in American historyIn the late 19th and 20th centuries, Pittsburgh-based U.S. Steel, Bethlehem-based Bethlehem Steel, and other Pennsylvania manufacturing companies inspired the Industrial Revolution and contributed to the development of much of the nation's early infrastructure, including key bridges, skyscrapers, and warships, tanks, and other military hardware that proved vital to U.S.-led victories in World War I, World War II, and the Cold War. Since Pennsylvania's 1787 founding, a number of influential Pennsylvanians have contributed significantly to the nation in many fields, including the military, politics, business, scientific innovation, thought leadership, philanthropy, music, art, and sports.

Philadelphia is the largest city in the Commonwealth of Pennsylvania in the United States. It is the sixth-most-populous city in the United States and the most populous city in the state of Pennsylvania, with a 2020 population of 1,603,797. It is the second-most populous city in the Northeastern United States, behind New York City. Since 1854, the city has had the same geographic boundaries as Philadelphia County, the most-populous county in Pennsylvania and the urban core of the eighth-largest U.S. metropolitan statistical area, with more than 6 million residents as of 2017. Philadelphia is the economic and cultural center of the greater Delaware Valley along the lower Delaware and Schuylkill rivers within the Northeast megalopolis. The Delaware Valley's 2019 estimated population of 7.21 million makes it the ninth-largest combined statistical area in the United States.Philadelphia is one of the oldest municipalities in the United States. William Penn, an English Quaker, founded the city in 1682 to serve as capital of the Pennsylvania Colony. Philadelphia played an instrumental role in the American Revolution as a meeting place for the Founding Fathers of the United States, who signed the Declaration of Independence in 1776 at the Second Continental Congress, and the Constitution at the Philadelphia Convention of 1787. Several other key events occurred in Philadelphia during the Revolutionary War, including the First Continental Congress, the preservation of the Liberty Bell, the Battle of Germantown, and the Siege of Fort Mifflin. Philadelphia remained the nation's largest city until 1790, when it was surpassed by New York City. It served as one of the nation's capitals during the revolution, and served as temporary U.S. capital while Washington, D.C. was under construction.

In the 19th and 20th centuries, Philadelphia became a major industrial center and a railroad hub. Its industrial jobs attracted European immigrants, most of whom initially came from Ireland and Germany—the two largest reported ancestry groups in the city as of 2015. Later immigrant groups in the 20th century came from Italy (Italian being the third-largest European ethnic ancestry currently reported in Philadelphia) and other Southern European and Eastern European countries. In the early 20th century, Philadelphia became a prime destination for African Americans during the Great Migration after the Civil War. Puerto Ricans began moving to the city in large numbers in the period between World War I and II, and in even greater numbers in the post-war period. The city's population doubled from one million to two million people between 1890 and 1950.

The Philadelphia area's many universities and colleges make it a top study destination, as the city has developed as an educational and economic hub. As of 2019, the Philadelphia metropolitan area is estimated to produce a gross metropolitan product (GMP) of $490 billion. Philadelphia is the center of economic activity in Pennsylvania and is home to five Fortune 1000 companies. The Philadelphia skyline is expanding, with a market of almost 81,900 commercial properties in 2016, including several nationally prominent skyscrapers. Philadelphia has more outdoor sculptures and murals than any other American city. Fairmount Park, when combined with the adjacent Wissahickon Valley Park in the same watershed, is one of the largest contiguous urban park areas in the United States. The city is known for its arts, culture, cuisine, and colonial history, attracting 42 million domestic tourists in 2016 who spent $6.8 billion, generating an estimated $11 billion in total economic impact in the city and surrounding four counties of Pennsylvania. Philadelphia is also a biotechnology hub.Philadelphia is the home of many U.S. firsts, including the nation's first library (1731), hospital (1751), medical school (1765), national capital (1774), university (by some accounts) (1779), stock exchange (1790), zoo (1874), and business school (1881). Philadelphia contains 67 National Historic Landmarks and the World Heritage Site of Independence Hall. The city became a member of the Organization of World Heritage Cities in 2015, as the first World Heritage City in the United States.