Brown was initially introduced on a caretaker basis in March, but the former Hull City and Southend United boss only won two of his 10 matches in charge.
However, despite missing out on the playoffs this season, the Robins have opted to keep faith in the vastly-experienced Brown ahead of the next campaign.
Chairman Lee Power told the club's official website: "We had a very good meeting on Tuesday evening and we spent a day going through budgets and personnel for next season, which we finalised today hence the delay in making this announcement.
"One of the key reasons behind appointing Phil on a permanent basis was that I feel the club needs some stability, which he gives us in abundance. We were obviously disappointed not to make the playoffs last season and no one more so than Phil.
"This deal gives Phil an opportunity to put his own stamp on the team and, with his record and experience in management, I think he'll help bring this club success over the next two years."
Swindon finished this season in ninth place in the standings, seven points adrift of the playoffs.