However prosecutors said they will not punishing Victor Gevers, who was acting "ethically".
Gevers shared what he said were screenshots of the inside of Trump's account on 22 October, during the final stages of the US presidential election.
At the time, the White House denied it had been hacked and Twitter said it had no evidence of it.
Gevers said he was very happy with the outcome. "This is not just about my work but all volunteers who look for vulnerabilities in the internet", he said.
The cyber-security researcher conducted a semi-regular sweep of the Twitter accounts of high-profile US election candidates, on 16 October, when he had guessed President Trump's password.