His comments came just hours after Ayatollah Ali Khamenei, Iran's supreme leader, backed the outcome of the country's presidential elections and said protests against it must stop or people would face the consequences.
On Friday, Robert Gibbs, the US White House spokesman, said Obama felt those protesting should be able to do so without fear of reprisal.
"He believes ... those who wish to have their voices heard should be able to do that ... without fear of violence," he said.
"It's an important universal principal that should be upheld and I think he strongly supports that."
The vote on Friday came amid criticism of Obama, the US president, for not saying more on Tehran's handling of the election protests.
However, Obama had said in a previous statement that it was "not productive" to be seen as "meddling" in Iranian politics.
The US House of Representatives voted 405-1 to condemn Iran's crackdown on protests following its disputed presidential elections, in a resolution later approved by the senate.
The policy statement expressed support for "all Iranian citizens who embrace the values of freedom, human rights, civil liberties and rule of law" and affirms "the importance of democratic and fair elections".
It also condemns "the ongoing violence" by the government and pro-government militias against demonstrators, as well as government "suppression of independent electronic communications through interference with the internet and cell phones".
The move was welcomed by the White House on Friday.
Iranian opposition figures, led by Ahmadinejad's main challenger, Mir Hossein Mousavi, have said that the vote was rigged and hundreds of thousands of Iranians have held daily street protests since the poll results were announced.
Amnesty International, the UK-based human rights group, said on Friday that it believed 15 people had been killed as the protests spilled over into violence, compared with just seven deaths reported on Iranian state radio.