Aaron Swartz, a wizardly programmer who as a teenager helped develop code that delivered ever-changing Web content to users and who later became a steadfast crusader to make that information freely available, was found dead on Friday in his New York apartment.
An uncle, Michael Wolf, said that Mr. Swartz, 26, had apparently hanged himself, and that a friend of Mr. Swartz’s had discovered the body.
At 14, Mr. Swartz helped create RSS, the nearly ubiquitous tool that allows users to subscribe to online information. He later became an Internet folk hero, pushing to make many Web files free and open to the public. But in July 2011, he was indicted on federal charges of gaining illegal access to JSTOR, a subscription-only service for distributing scientific and literary journals, and downloading 4.8 million articles and documents, nearly the entire library.
Charges in the case, including wire fraud and computer fraud, were pending at the time of Mr. Swartz’s death, carrying potential penalties of up to 35 years in prison and $1 million in fines.
“Aaron built surprising new things that changed the flow of information around the world,” said Susan Crawford, a professor at the Cardozo School of Law in New York who served in the Obama administration as a technology adviser. She called Mr. Swartz “a complicated prodigy” and said “graybeards approached him with awe.”
Mr. Wolf said he would remember his nephew, who had written in the past about battling depression and suicidal thoughts, as a young man who “looked at the world, and had a certain logic in his brain, and the world didn’t necessarily fit in with that logic, and that was sometimes difficult.”
The Tech, a newspaper of the Massachusetts Institute of Technology, reported Mr. Swartz’s death early Saturday.
Mr. Swartz led an often itinerant life that included dropping out of Stanford, forming companies and organizations, and becoming a fellow at Harvard University’s Edmond J. Safra Center for Ethics.
He formed a company that merged with Reddit, the popular news and information site. He also co-founded Demand Progress, a group that promotes online campaigns on social justice issues — including a successful effort, with other groups, to oppose a Hollywood-backed Internet piracy bill.
But he also found trouble when he took part in efforts to release information to the public that he felt should be freely available. In 2008, he took on PACER, or Public Access to Court Electronic Records, the repository for federal judicial documents.
The database charges 10 cents a page for documents; activists like Carl Malamud, the founder of public.resource.org, have long argued that such documents should be free because they are produced at public expense. Joining Mr. Malamud’s efforts to make the documents public by posting legally obtained files to the Internet for free access, Mr. Swartz wrote an elegant little program to download 20 million pages of documents from free library accounts, or roughly 20 percent of the enormous database.
The government shut down the free library program, and Mr. Malamud feared that legal trouble might follow even though he felt they had violated no laws. As he recalled in a newspaper account, “I immediately saw the potential for overreaction by the courts.” He recalled telling Mr. Swartz: “You need to talk to a lawyer. I need to talk to a lawyer.”
Mr. Swartz recalled in a 2009 interview, “I had this vision of the feds crashing down the door, taking everything away.” He said he locked the deadbolt on his door, lay down on the bed for a while and then called his mother.
The federal government investigated but did not prosecute.
In 2011, however, Mr. Swartz went beyond that, according to a federal indictment. In an effort to provide free public access to JSTOR, he broke into computer networks at M.I.T. by means that included gaining entry to a utility closet on campus and leaving a laptop that signed into the university network under a false account, federal officials said.
Mr. Swartz turned over his hard drives with 4.8 million documents, and JSTOR declined to pursue the case. But Carmen M. Ortiz, a United States attorney, pressed on, saying that “stealing is stealing, whether you use a computer command or a crowbar, and whether you take documents, data or dollars.”
Founded in 1995, JSTOR, or Journal Storage, is nonprofit, but institutions can pay tens of thousands of dollars for a subscription that bundles scholarly publications online. JSTOR says it needs the money to collect and to distribute the material and, in some cases, subsidize institutions that cannot afford it. On Wednesday, JSTOR announced that it would open its archives for 1,200 journals to free reading by the public on a limited basis.
Mr. Malamud said that while he did not approve of Mr. Swartz’s actions at M.I.T., “access to knowledge and access to justice have become all about access to money, and Aaron tried to change that. That should never have been considered a criminal activity.”
Mr. Swartz did not talk much about his impending trial, Quinn Norton, a close friend, said on Saturday, but when he did, it was clear that “it pushed him to exhaustion. It pushed him beyond.”
Recent years had been hard for Mr. Swartz, Ms. Norton said, and she characterized him “in turns tough and delicate.” He had “struggled with chronic, painful illness as well as depression,” she said, without specifying the illness, but he was still hopeful “at least about the world.”
Cory Doctorow, a science fiction author and online activist, posted a tribute to Mr. Swartz on BoingBoing.net, a blog he co-edits. In an e-mail, he called Mr. Swartz “uncompromising, principled, smart, flawed, loving, caring, and brilliant.”
“The world was a better place with him in it,” he said.
Mr. Swartz, he noted, had a habit of turning on those closest to him: “Aaron held the world, his friends, and his mentors to an impossibly high standard — the same standard he set for himself.” Mr. Doctorow added, however, “It’s a testament to his friendship that no one ever seemed to hold it against him (except, maybe, himself).”
In a talk in 2007, Mr. Swartz described having had suicidal thoughts during a low period in his career. He also wrote about his struggle with depression, distinguishing it from sadness.
“Go outside and get some fresh air or cuddle with a loved one and you don’t feel any better, only more upset at being unable to feel the joy that everyone else seems to feel. Everything gets colored by the sadness.”
When the condition gets worse, he wrote, “you feel as if streaks of pain are running through your head, you thrash your body, you search for some escape but find none. And this is one of the more moderate forms.”
Ravi Somaiya contributed reporting.
This article has been revised to reflect the following correction:
Correction: January 12, 2013
An earlier version of this article incorrectly identified the police who arrested Mr. Swartz, and when they did so. The police were from Cambridge, Mass., not the Massachusetts Institute of Technology campus force, and the arrest occurred two years before Mr. Swartz’s suicide, but not two years to the day.