The activist and programmer took his life in his New York apartment, a relative and the state medical examiner said. His body was found on Friday.
Aaron Swartz began computer programming as a child, and at 14 co-authored an early version of the RSS specification.
He later became an advocate of internet freedom, and was facing hacking charges at the time of his death.
Aaron Swartz was among the founders of the Demand Progress campaign group, which lobbies against internet censorship.
The hacking charges relate to the downloading of millions of academic papers from online archive JSTOR, which prosecutors say he intended to distribute for free.
He denied charges of computer fraud at an initial hearing last year, but his federal trial was due to begin next month.
Aaron Swartz’s lawyer Elliot R. Peters confirmed the news of his client’s death in an email to the MIT university newspaper The Tech.
“The tragic and heartbreaking information you received is, regrettably, true,” he wrote.
A spokeswoman for New York’s medical examiner later confirmed to Associated Press news agency that Aaron Swartz had hanged himself.
Image source: Wikimedia Commons President-elect Donald Trump celebrated his election victory at the Ultimate Fighting…
Millions of voters across the US chose to return Donald Trump to the White House…
Donald Trump declares victory in the US election as he addresses jubilant supporters in Florida.…
Stocks around the world are rising as Donald Trump appears to be on the cusp…
Donald Trump has won Pennsylvania, North Carolina and Georgia and taken a lead over Kamala…
Quincy Jones, the celebrated musician and producer who worked with Michael Jackson, Frank Sinatra, Ray…