Costa was an injury doubt with a hamstring tear after lasting less than 10 minutes for Atletico Madrid in the Champions League final last Saturday and still faces a race against time to be fit for Spain's first game against Holland on June 13.
Torres has endured a tough season for Chelsea, but scored from the spot in the 2-0 friendly win over Bolivia on Friday night.
The Spanish Football Federation announced on Saturday that both strikers had made the cut and were in Vicente Del Bosque's final 23-man party for Brazil.
It meant no place for Negredo, who enjoyed a flying start to his City career last term, but tailed off badly towards the end of the season.
Chile and Australia are the other two teams in the defending champions' group.
Midfielders: Xavi (Barcelona), Xabi Alonso (Real Madrid), Andres Iniesta (Barcelona), Koke (Atletico Madrid), Sergio Busquets (Barcelona), Santi Cazorla (Arsenal), Cesc Fabregas (Barcelona), Juan Mata (Manchester United), David Silva (Manchester City)
- Sports & Recreation
- Atletico Madrid
- Real Madrid
- Manchester United
- Cesar Azpilicueta
- David De Gea