US President Donald Trump has signed a bill ordering the justice department to release all its files from its investigation into convicted paedophile Jeffrey Epstein.

The legislation, which calls for the release of the files 'in a searchable and downloadable format' within 30 days, was approved overwhelmingly in both chambers of Congress, the House of Representatives and Senate, on Tuesday.

Trump then announced on his Truth Social platform that he had signed it on Wednesday, starting the clock on release of the files.

Under pressure from Epstein's victims and rank-and-file Republicans, Trump on Sunday made a major reversal in his stance on the files and gave his blessing to passing the legislation. For months, he had resisted unsealing many documents from the federal investigation into the late financier.

Congress' lower chamber began debating the measure on Tuesday morning and voted within hours. Several of Epstein's victims spent the day on Capitol Hill advocating for the bill's passage.

Nearly all House lawmakers voted in favour of the resolution, which passed 427-1. Clay Higgins, a Louisiana Republican, was the only one who voted against the bill. Two Republicans and three Democrats did not vote. The Senate then passed the resolution.

The House Oversight Committee has already made public thousands of documents from the Epstein estate relating to the late financier, but the resolution covers material currently in the possession of the justice department.

Those records could, in theory, include files about imprisoned Epstein co-conspirator Ghislaine Maxwell, as well as figures - including government officials - mentioned in the case. It could also include internal justice department documents.

On Wednesday morning, the Senate confirmed that it had passed the Epstein bill and sent it to Trump.

Later that evening, Trump posted on social media that he had signed it into law. While the press and others are often invited to witness Trump's bill-signings, this was done out of public view, and the announcement was included in a long post that also blasted Democrats he claimed were tied to Epstein, touted the president's record during this second term, and addressed the two impeachment trials of his first term.

'Perhaps the truth about these Democrats, and their associations with Jeffrey Epstein, will soon be revealed, because I HAVE JUST SIGNED THE BILL TO RELEASE THE EPSTEIN FILES!' he wrote.

The justice department now has 30 days to release its materials on Epstein.

But there are obstacles to the files being shared. The House bill said the justice department can hold back any documents that 'jeopardize an active federal investigation or ongoing prosecution, provided that such withholding is narrowly tailored and temporary'. That could potentially lead to delays, given that Trump has called for investigations into Epstein's links with prominent Democrats, such as Bill Clinton and Larry Summers, 'to determine what was going on with them, and him'.

In addition to possible delays, the public is also likely to see lots of redactions in any release of new Epstein documents. In the tranche of files released by the House Oversight Committee last week, names and phone numbers were frequently blacked out to protect privacy.

One attorney who handles sexual abuse cases supported Congress improving the provision. But she said releasing the files still might impact Epstein survivors.

'I'm glad in the act itself they put specific language reinforcing the privacy rights of the victims here', said Christine Dunn, co-managing partner at Sanford Heisler Sharp McKnight's Washington, DC, office. 'I'm torn because I think transparency is almost always a good thing, I don't think things change until someone shines a light on them,' she said. 'But at the same time for the victims, having to relive this in the media is going to be hard.'

The attorney general can also withhold classified material and images of sexual abuse. The justice department already said that a 'large volume' of its 300 gigabytes of data from Epstein investigations includes images and videos of minors and thousands of downloaded videos and images of child sex abuse. Other information in the documents could be protected by grand jury secrecy rules, which the latest bill does not explicitly address.

US Attorney General Pam Bondi said on Wednesday morning when asked about the Epstein files during an unrelated news conference: 'We'll continue to follow the law with maximum transparency, while protecting victims.'