Manning was convicted of 20 crimes including espionage, theft and computer fraud for leaking classified information to WikiLeaks while working as an intelligence analyst in Iraq in 2010. But he was acquitted of the most serious charge: aiding the enemy.
The 25-year-old could have gotten 90 years behind bars. Prosecutors had asked for at least 60 years as a warning to other soldiers, while Manning's lawyer suggested he get no more than 25 because some of the documents he leaked will be declassified by then.
In a brief hearing, military judge Col. Denise Lind didn't offer any explanation for the sentence she gave Manning.
Last week during the sentencing phase, Manning gave an unsworn statement apologizing for his actions.
"I'm sorry that my actions hurt people. I'm sorry that it hurt the United States," he said.
Manning said he understood what he was doing and the decisions he made. However, he said he did not believe at the time that leaking the information would cause harm.
Manning's lawyers contend that Manning showed clear signs of deteriorating mental health that should have prevented commanders from sending him to a warzone to handle classified information.
The Associated Press contributed to this report.