Reddit founder and social justice campaigner Aaron Swartz has been found dead, weeks before he was due to face trial in the United States on hacking charges.

Swartz, 26, hanged himself at his home in Brooklyn, New York City, on Friday night.

The founder of the social news website Reddit was facing up to 50 years in jail, if convicted of illegally downloading four million files from the Massachusetts Institute of Technology (MIT) and web research group JSTOR - short for "Journal Storage".

In a statement following his shock death, Swartz's family spoke of their grief and anger at the severity of the charges he was facing.

"Today, we grieve for the extraordinary and irreplaceable man that we have lost," they said.

"Aaron's death is not simply a personal tragedy. It is the product of a criminal justice system rife with intimidation and prosecutorial overreach. Decisions made by officials in the Massachusetts U.S. Attorney's office and at MIT contributed to his death.

"The US Attorney's office pursued an exceptionally harsh array of charges, carrying potentially over 30 years in prison, to punish an alleged crime that had no victims. Meanwhile, unlike JSTOR, MIT refused to stand up for Aaron and its own community's most cherished principles."

Proceedings against Swartz brought by law enforcers were likened to "trying to put someone in jail for allegedly checking too many books out of the library," by Demand Progress - the anti-censorship campaign he founded.

Swartz was set to stand trial in April. He had suffered bouts of depression relating to the legal proceedings. Former partner Quinn Norton said the couple had been "destroyed" by the investigation.

The victim of Swartz's alleged hacking, JSTOR, said it "regretted" proceedings against him. In a statement, the digital archive said he had returned the documents. "We join those who are mourning this tragic loss," it said.

His prosecution for hacking sparked a campaign for freedom of information, with social justice lawyer Bettina Neuefeind starting a money-raising website to pay his legal costs.

Swartz helped develop Reddit into an influential web location, with millions of people visiting each month. He founded the wiki platform Infogami, which is used to support the Open Library website. Swartz also worked at prestigious academic institute MIT with web founder Sir Tim Berners-Lee.

Swartz previously used his personal website to discuss suicide. In 2007, he wrote: "There is a moment, immediately before life becomes no longer worth living, when the world appears to slow down and all its myriad details suddenly become brightly, achingly apparent."

Reddit Founder Aaron Swartz Suicide: Family Statement [FULL TEXT]