The 32-year-old is gearing up for his sixth major international tournament, having won the World Cup in 2010 and the European Championships in 2008 and 2012.
The Real midfielder was forced to miss last summer's Confederations Cup with a hip injury but recovered to play a key role in his side's capture of the UEFA Champions League last season.
And he hinted he could prolong his international career beyond Brazil as long as he remains fit.
"I haven't decided whether I will quit Spain [after the World Cup]," Alonso told Spanish radio station Cope.
"I'm really focused on the World Cup and it depends how I feel after the tournament, I'll decide then.
"If my body reponds and I feel as though I want to continue, then I'll continue."
On the domestic front, Alonso credited former boss Jose Mourinho for making Real competitive again in Europe after six years of disappointing campaigns - but insisted the current Chelsea manager's achievements in his three-year tenure at the Bernabeu were not good enough.
Mourinho guided Madrid to the semi-finals of the Champions League in each of his three seasons in charge of the club, but never reached the final, while his successor Carlo Ancelotti presided over the team capturing a 10th European Cup in his first season with Real.
"Mourinho had an important impact because after so many years of Madrid getting knocked out at the last 16, reasserting the team's place was important - but evidently no-one can be happy with that because that was not the objective," said Alonso.
The former Liverpool man missed out on Real's 4-1 win over neighbours Atletico Madrid in the Champions League final due to suspension but celebrated Gareth Bale's crucial goal in extra-time by charging up the touchline to celebrate with the players.
Alonso admitted that he was distraught not to play in the Lisbon showpiece despite his exuberant celebrations.
"I didn't cry about not playing, although I cried in another way on the inside," he said.
"But after all, I don't remember ever being so happy about a match I didn't play in. I was really keen to win the Champions League. If you play for Real Madrid and you don't win it, you feel as though you haven't made history."