A trove of al-Qaeda documents seized by US commandos in the 2011 raid that killed Osama bin Laden is to be released to the public - with the exception of his pornography stash.

CIA director Mike Pompeo said the wide-ranging cache of files retrieved by Navy Seals from the late al-Qaeda chief's compound in Abbottabad, Pakistan, would be declassified within weeks.

Millions of electronic and paper documents seized contain family letters, papers on Islamic history, books, and notes about al-Qaeda's operations.

They also includes an extensive collection of modern pornography videos, according to US officials.

The government has previously released hundreds of files seized from the compound, including letters that revealed bin Laden's fear of surveillance and obsession with attacking the West.

Mr Pompeo told Fox News he believed it was important for national security to make most of the documents public, but added the explicit material would remain under wraps.

"Once we are sure that there’s not classified material and that there’s not things that we can’t release, I want to make sure the world gets to see them so that we can have lots of hands touching them and making good judgments about how to make sure that we don’t have a 9/11, that we don’t have this kind of risk again," he said.

"There’s some pornography, there’s some copyrighted material. Everything other than those items will be released in the weeks ahead."

Declassified CIA documents throw new light on Osama Bin Laden

In 2015, the CIA rejected a Freedom of Information Act request for access to bin Laden's pornography from the website, BroBible.

Michael Lavergne, the CIA's information officer, said the agency would be prohibited by federal law "from mailing obscene matter".

Bin Laden's compound is said to have been cut off from the internet and other hard-wired communications networks and it is unclear how the pornography would have been accessed.

Officials told Reuters they did not know who had been viewing it or if bin Laden himself had acquired or watched the material.

Materials seized from the hideaway included digital thumb drives, which officials believe may have been a key means by which couriers transported electronic messages to and from the al-Qaeda leader.