Marin City is an unincorporated community and census-designated place (CDP) in Marin County, California, United States. As of the 2020 census, it had a population of 2,993, up from 2,666 in 2010. It is located 1.5 miles (2.4 kilometers) northwest of downtown Sausalito, 8 miles (13 km) south-southeast of San Rafael, and about 5 miles (8 km) north of San Francisco from the Golden Gate Bridge, at an elevation of 23 feet (7.0 m). Marin City was developed for housing starting in 1942, to accommodate wartime shipyard workers and other migrants to California. Among those were African Americans from the South in the Great Migration, which continued until 1970.
 After World War II, the area became predominantly African-American, as white residents were able to move freely to private housing elsewhere in Marin County. Since the 1980s, additional development has changed the makeup of the population while providing more local jobs. In 2018, Marin City's socioeconomic and racial makeup (median household income of $40,000, and almost 40 percent Black) contrasts with the mostly wealthy and White population in Marin County overall (greater than $80,000 median income, less than four percent Black).
 Prior to World War II, this area was occupied by a dairy farm and a handful of families. Soon after war was declared on December 8, 1941, Marin City was rapidly built during 1942 in order to house 6,000 of the 20,000 workers who migrated from all over the United States, attracted by the defense jobs at Marinship, the Sausalito waterfront shipyard. A total of 93 liberty ships and tankers were built and launched from Marinship in fewer than three years.
 Many of the African-American shipyard laborers who had migrated to the Bay Area from the South during the second phase of the Great Migration continued to live in Marin City after the war, either by choice or because many black families were restricted by local zoning from living in or buying homes in the towns surrounding Marin City. They became the core of the community after many of the other workers moved to other areas at the end of the war. During the war, African Americans comprised about 10 percent of Marin City's population. By the 1970s, African Americans comprised more than 75 percent of the population of Marin City, most of whom were descendants of the Marinship workers.
 During the 1980s and 1990s there was considerable residential and commercial development in the community, including several new housing developments, apartment complexes, and condo developments. The commercial area was expanded, particularly with the construction of the Gateway Shopping Center in 1996, which displaced a locally renowned flea market. As of 2010, the community population was 38.9 percent white and 38.1 percent African American; nearly 14 percent were Hispanic of any race. In the early 21st century, Marin City residents and officials have begun to think about incorporating as a city.
 Marin City is located in southern Marin County at 38°52'07" North, 122°30'33" West, about 5 miles (8 km) north of San Francisco. It is bordered to the southeast by the city of Sausalito and to the west by Tamalpais Valley. The U.S. Route 101 freeway forms the northeast edge of the community, beyond which is Richardson Bay, an arm of San Francisco Bay. The community is bordered to the southwest by the hills of the Golden Gate National Recreation Area.
 According to the United States Census Bureau, the CDP had an area of 0.54 square miles (1.40 km2), all land.
 The municipal authority for Marin City is the Marin City Community Services District (MCCSD), a multi-purpose California special district that is governed by a publicly elected five-member board of directors. It is administered by a district manager and staff. As of June 2011, the District Manager is Monique Brown and the Board President is Nancy Johnson.
 Chartered in 1958, the MCCSD is responsible for providing services in the areas of parks and recreation, street lighting, recycling and refuse removal. Total operating revenue for MCCSD's fiscal year 2016–2017 was $1,300,000.
 According to the Marin County Local Agency Formation Commission (LAFCO), the District has a total area of 0.9 square miles (2.3 km2).
 The 2010 United States Census reported that Marin City had a population of 2,666. The population density was 4,967.0 inhabitants per square mile (1,917.8/km2). The racial makeup of Marin City was 1,037 (38.9%) White, 1,017 (38.1%) African American, 15 (0.6%) Native American, 287 (10.8%) Asian, 21 (0.8%) Pacific Islander, 120 (4.5%) from other races, and 169 (6.3%) from two or more races.  Hispanic or Latino of any race were 365 persons (13.7%).
 Among the Asian population, largest ethnic groups were Vietnamese (3.0%), followed by Indians (2.9%), Filipinos (1.7%), Chinese (1.2%), Japanese (0.6%), Koreans (0.3%), and Other Asian (1.3%). Among Hispanics and Latinos, the largest ethnic groups were Mexican (5.7%), followed by Central Americans (3.4%), South Americans (1.8%), Puerto Ricans (0.6%), and Other Hispanics (2.0%).
 The Census reported that 100% of the population lived in households.
 There were 1,197 households, out of which 380 (31.7%) had children under the age of 18 living in them, 298 (24.9%) were opposite-sex married couples living together, 300 (25.1%) had a female householder with no husband present, 57 (4.8%) had a male householder with no wife present.  There were 85 (7.1%) unmarried opposite-sex partnerships, and 18 (1.5%) same-sex married couples or partnerships. 427 households (35.7%) were made up of individuals, and 94 (7.9%) had someone living alone who was 65 years of age or older. The average household size was 2.23.  There were 655 families (54.7% of all households); the average family size was 2.91.
 The population was spread out, with 633 people (23.7%) under the age of 18, 261 people (9.8%) aged 18 to 24, 820 people (30.8%) aged 25 to 44, 703 people (26.4%) aged 45 to 64, and 249 people (9.3%) who were 65 years of age or older.  The median age was 35.6 years. For every 100 females, there were 83.1 males.  For every 100 females age 18 and over, there were 75.4 males.
 There were 1,309 housing units at an average density of 2,438.8 per square mile (941.6/km2), of which 30.7% were owner-occupied and 69.3% were occupied by renters. The homeowner vacancy rate was 2.1%; the rental vacancy rate was 8.6%. 27.2% of the population lived in owner-occupied housing units and 72.8% lived in rental housing units.
 Marin City is served by the Sausalito Marin City School District for primary grades (K-8) and the Tamalpais Union High School District for secondary grades. The K-8 district operates Martin Luther King, Jr. Academy (Formerly Bayside-Martin Luther King Jr. Academy), a K-8 school with preschool and middle school in Marin City and elementary school in Sausalito.
 There was formerly Willow Creek Academy, a public charter school in Sausalito which is affiliated with the district. As of 2016 about 150 students in Marin City attended Willow Creek, while Bayside King had a total student enrollment of 143. As of the 2018–2019 school year Willow Creek Academy has 407 students enrolled. Being that Willow Creek is a charter school they welcome anyone who lives in California, although most of the students live within the school district, which is Sausalito and Marin City and other communities in Marin County. Several parents outside of the county also found that Willow Creek was a good fit for their children, most of them being from Fairfield and Vallejo.
 In previous eras Grades K-6 were allowed to attended either Bayside Elementary School in Sausalito or Willow Creek Academy (a public charter school), both in Sausalito. Grades 7–8 attended Martin Luther King Jr. Academy in Marin City, or Willow Creek Academy. Residents may attend Willow Creek Academy, a K-8 school in Sausalito. Beginning in the fall of 2013, Bayside was scheduled to close, with Willow Creek taking the former Bayside campus, making MLK a K-8. The consolidation of Bayside into MLK will be in effect in the fall of 2013. In 2014 Bayside moved to Marin City joining MLK, now being known as Bayside MLK Academy. During this time they had no stable principal and not enough teachers for each class.  As of now the principal of the school is David Finnane. The new motto of the school is "Panther Pride". Pride standing for, Pride, Respect, Integrity, Determination, Excellence. In 2021 Willow Creek consolidated into the Martin Luther King School in Marin City.
 Students in grades 9–12 attend Tamalpais High School in Mill Valley and Redwood High School.
 Marin City is served by the Marin City Library, a branch of the Marin County Free Library that is within the Gateway Shopping Center.
 Homes sold in Marin City are often labeled as being located in Sausalito since Marin City shares the 94965 ZIP Code, the 331 and 332 telephone prefixes, and Sausalito Marin City School District with its close neighbor Sausalito. Most of the housing in Marin City was developed in the 1970s, '80s and '90s after much of the temporary Marinship housing put up in 1942 had been razed.
 Once famous for the Marin City Flea Market which was forcibly closed in the mid-1990s, despite community protest, to make way for the Gateway Shopping Center, the MCCSD had planned to launch the smaller-scale Marin City Market Fest on selected Saturdays in the summer of 2006.