The move comes as Britain continues to try to secure the release from jail of dual national Nazanin Zaghari-Ratcliffe.
Tehran has also recently sentenced an Iranian British Council employee, Aras Amiri, to 10 years in prison on charges of spying.
In a statement, the Foreign Office said British-Iranian dual nationals faced an "unacceptably higher risk of arbitrary detention and mistreatment" than nationals of other countries.
"The security forces may be suspicious of people with British connections, including those with links to institutions based in the UK, or which receive public funds from, or have perceived links to, the British government," the statement said.
British-Iranian mother Zaghari-Ratcliffe was arrested by Iranian authorities in 2016 as she was leaving Tehran.
Zaghari-Ratcliffe, who worked for the Thomson Reuters Foundation, was put on trial and is now serving a five-year jail sentence for allegedly trying to topple the Iranian government.
"Dual nationals face an intolerable risk of mistreatment if they visit Iran," Foreign Secretary Jeremy Hunt said.
"Despite the UK providing repeated opportunities to resolve this issue, the Iranian regime's conduct has worsened.
"Having exhausted all other options, I must now advise all British-Iranian dual nationals against travelling to Iran.
"The dangers they face include arbitrary detention and lack of access to basic legal rights, as we have seen in the case of Nazanin Zaghari-Ratcliffe, who has been separated from her family since 2016."
The Iranian government does not recognise dual nationality, meaning the Foreign Office's ability to provide consular support is limited.
Hunt added: "Regrettably, I must also offer a message of caution to Iranian nationals resident in the UK - but who return to visit family and friends - especially where the Iranian government may perceive them to have personal links to UK institutions or the British government."