His goal was to change the world with computer code, but now Mark Zuckerberg is facing the test of his life in rescuing Facebook from a deepening crisis over its failure to protect privacy and thwart manipulation.
The 33-year-old computer genius who has been a Silicon Valley star for a decade is on the hot seat in Washington and around the world, trying to fix pervasive problems in the world's biggest social network.
As founder and chief executive of Facebook, with about two billion users, Zuckerberg controls the online giant which has power over an online "conversation" that affects the news media, elections and much more.
He began writing computer programs at the age of 11, and at the prestigious Phillips Exeter Academy was captain of the fencing team, before entering the elite Harvard University.
Zuckerberg launched Thefacebook.com, as it was then known, from his dorm room on February 4, 2004 with some of his roommates and classmates.
He dropped out of Harvard three months later for Silicon Valley, where he received his first major funding -- $500,000 -- from PayPal co-founder Peter Thiel.
As he prepared for his Tuesday showdown in Congress, Zuckerberg acknowledged that he and Facebook had been too naive.
"For most of our existence, we focused on all the good that connecting people can bring," he said in remarks prepared for delivery.
Zuckerberg, who has ditched his customary T-shirts and casual wear in favor of a suit for his appearances in Washington, said Facebook has been an important tool for social movements and helps users "stay connected to the people they love."
"But it's clear now that we didn't do enough to prevent these tools from being used for harm as well," he said.
"It was my mistake," he said.
- 'A reckless company' -
Some critics say Facebook was bound to crash into problems because of how it was built.
Zeynep Tufekci, a University of North Carolina sociologist specializing in social media, said Zuckerberg's business depends on the extensive data it collects.
"It does not want to give that resource away," Tufekci said, but it did so "in part because it is a reckless company," she wrote in The New York Times.
Zuckerberg's firm also gave away data because it was a tantalizing resource for programmers and could be used to lure developers to make games, quizzes and other apps for Facebook "that would keep users coming back to the site," Tufekci said.
Facebook has prospered on digital advertising that benefits from being able to use what people share about themselves to target ads, reshaping the marketing industry.
What is sometimes called a "duopoly" of Google and Facebook controls about 56 percent of the US digital ad market this year, according to research firm eMarketer.
Zuckerberg's California-based social network has been a flashpoint for controversies about bullying, harassment, free speech, extremist propaganda, election meddling, privacy, and more.
"They don't put enough effort into making sure the user is protected and the experience is assured," tech industry analyst Rob Enderle said.
In 2008, a $65 million settlement was reached with three Harvard classmates -- twins Tyler and Cameron Winklevoss, and Divya Narendra -- over their charges that Zuckerberg had stolen the idea for Facebook from them.
The conflict was at the heart of "The Social Network," an Oscar-winning film written by Aaron Sorkin and directed by David Fincher.
- A Facebook fortune -
He is known for setting annual goals, which have included wearing ties every day, only eating meat of animals he kills himself, and learning to speak Chinese.
Zuckerberg cemented his fortune by leading Facebook to a historic Wall Street debut in 2012.
The $16 billion IPO was structured to keep control of Facebook in the hands of Zuckerberg, who has been Time's "Person of the Year."
Forbes estimated his net worth at about $64 billion, and he cracked the magazine's list of the world's 20 richest people.
Zuckerberg and his doctor wife, Priscilla Chan, have pledged to give away their Facebook fortune to make the world a healthier, happier place for children.
"Having kids changes a lot," Zuckerberg said in an interview with CNN.
"I used to think that the most important thing to me by far was having the greatest impact across the world as I can; now I just really care about building something my girls are going to grow up and be proud of me for."