Bulgaria were sanctioned after a group of supporters racially abused Denmark substitute Patrick Mtiliga every time he touched the ball after entering the field in the second half of their 2014 World Cup qualifier in Sofia in October.
Hungary's punishment followed anti-Semitic chanting by fans in a friendly at home to Israel in August.
Some Hungarian supporters chanted slogans such as "Dirty Jews", "Buchenwald", and "Viva Mussolini" as Israel's players listened to their national anthem.
In both cases, FIFA's disciplinary committee warned that a repetition could lead to harsher penalties which include a possible points deduction, the forfeiting of the match or even disqualification from the competition.
In an unusually strongly-worded statement, FIFA described the incidents in Sofia as "offensive, denigratory and discriminatory" while the incidents in Budapest were labelled "abhorrent".
The sanctions came as FIFA's European counterpart UEFA is accused of being too lenient on cases of racism, letting offending clubs off with fines.
Porto, Lazio and Serbia have all been given fines over recent racism cases by European football's disciplinary committee although UEFA itself has appealed the Serbia decision, relating to an under-21 match at home to England, and asked for stronger sanctions.
Bulgaria, whose next home game in Group B is against Malta in March, were also fined 35,000 Swiss francs (£24,000) and Hungary, who host Romania also in March in Group D, were fined 40,000 francs (£27,000).
Hungary's match is potentially decisive as the two sides are level in second place with nine points, three behind leaders and clear favourites Netherlands.
FIFA said that during the Bulgaria match, also marred by a firework-throwing incident in the seventh-minute, fans were warned by the stadium announcer about their behaviour in the 73rd minute.
"Although the level of abuse subsided, audible racist abuse still continued until the final whistle," said FIFA.
"The disciplinary committee agreed that the offensive, denigratory and discriminatory actions of a small group of Bulgarian supporters, was shameful and a clear breach of the FIFA Disciplinary Code.
"In addition, the incendiary devices thrown, which can pose considerable threats to personal safety, are also not tolerated."
FIFA said that in Hungary's case, it had been informed by the FARE (Football Against Racism Europe) group that some supporters had made anti-Semitic chants and displayed offensive symbols.
"The members of the FIFA disciplinary committee were unanimous in condemning an abhorrent episode of racism, anti-Semitism, and of political provocative and aggressive nature perpetrated by supporters of the Hungarian national team," said FIFA.
It added that the Hungarian federation had acknowledged and regretted the fans' behaviour.
Last week, AC Milan midfielder Kevin-Prince Boateng, who played for Ghana at the 2010 World Cup, took his shirt off and walked off the pitch after being racially insulted in a pre-season friendly against fourth-tier side Pro Patria. His team-mates followed him and the match was abandoned.
FIFA president Sepp Blatter described Boateng's behaviour as courageous on Monday, although he said such gestures were not the long-term solution to racism.
Pro Patria must play their next home league match behind closed doors.