Spain will open their defence of the World Cup next year with a repeat of the 2010 final with Netherlands.
Vicente del Bosque's side will also face South American opponents Chile and Australia, who progressed from the Asia qualification competition, in Group B.
Asked if Spain were in the toughest group, Del Bosque said: "No, I don't think so, the group with Uruguay, Italy and England is also tough."
Three-time winners Germany are in Group G with Portugal, Ghana and USA.
United States coach Jurgen Klinsmann, who won the World Cup as a player in 1990 with West Germany, said: "I kind of had in my stomach that we were going to get Germany.
"So, we will be meeting old friends," said Germany coach Joachim Low, who was Klinsmann's assistant during the 2006 World Cup.
"Jurgen and I have had a very good and close relationship for a long time."
Hosts Brazil open the month-long showpiece on 12 June in Sao Paulo against Croatia in Group A, who qualified for the tournament after defeating Iceland in the play-offs.
The five-time winners will then play Mexico and Cameroon to decide who reaches the knockout stages.
"We've got a difficult group, but the opening match of the World Cup against Brazil will be spectacular. I can't wait," Southampton's Croat defender Dejan Lovren said on Twitter.
Lionel Messi's Argentina are in Group F along with debutants Bosnia-Hercegovina, Iran and Nigeria.
Manchester City's Argentina striker Sergio Aguero said on Twitter: "There's no easy match in the World Cup, but effort and hard work always gives rewards!"
Aguero's country have twice been champions, but last won the tournament in 1986.
England are in a tough Group D. They open up against Italy, who knocked Roy Hodgson's side out of Euro 2012, 2010 semi-finalists Uruguay and Costa Rica.
Meanwhile, 1998 winners France, who defeated Ukraine in a dramatic play-off tie, will face neighbours Switzerland, Ecuador and Honduras in Group E.
Belgium, fifth favourites with some bookmakers to win the World Cup, are in Group H with Russia, South Korea and Algeria.
And in Group C, Colombia, who came second in the South American qualifying group, will face Greece, Ivory Coast and Japan.
Group draw for the 2014 World Cup:
Group A: Brazil, Croatia, Mexico, Cameroon.
Group B: Spain, Netherlands, Chile, Australia.
Group C: Colombia, Greece, Ivory Coast, Japan.
Group D: Uruguay, Costa Rica, England, Italy.
Group E: Switzerland, Ecuador, France, Honduras.
Group F: Argentina, Bosnia-Hercegovina, Iran, Nigeria.
Group G: Germany, Portugal, Ghana, USA.
Group H: Belgium, Algeria, Russia, South Korea.