Hungary were punished after fans chanted anti-Semitic slogans and displayed offensive symbols during a friendly against Israel last year.
Bulgaria received the same sanction after fans racially abused Denmark's defender Patrick Mtiliga every time he touched the ball in a World Cup qualifier in October.
Both countries challenged the ruling but FIFA's appeals committee has upheld the decisions.
Hungary will now play Romania without spectators on March 22, as will Bulgaria against Malta on the same night.
FIFA said in a statement: "The appeals lodged by the Hungarian Football Federation and Bulgarian Football Union were both rejected and the decisions of the FIFA disciplinary committee rendered on 20 November 2012, are confirmed in their entirety."
The Hungarian FA was also fined 40,000 Swiss francs (£28,000) and the Bulgaria FA 35,000 Swiss francs (£24,000).
The FIFA statement added: "Both associations been warned to their future conduct, and should such incidents of a racist/discriminatory nature occur again, the FIFA disciplinary committee would be left with no other option than to impose harsher sanctions, which could go as far as forfeiting a match, a points deduction, or disqualification from a competition."