The key measure declined by 1.4 points from 23.78 percent in the previous quarter, with 5.15 million people unemployed overall -- 295,600 fewer than in the first quarter, the National Statistics Institute said in a statement.
"Never in Spain's economic history have so many jobs been created in a single quarter," Prime Minister Mariano Rajoy said in a televised speech after the figures were released.
The unemployment level is still the second-highest in the eurozone after Greece, the starkest sign of the lingering damage from the economic crisis that erupted in 2008 after a building boom went bust.
Aún hay muchos españoles y familias pasándolo muy mal; me hago cargo. El Gobierno ni es ajeno ni permanece impasible— Mariano Rajoy Brey (@marianorajoy) July 23, 2015
"There are still many Spanish people and families having a very hard time. I will take care of that," Rajoy added in a Twitter message.
The government says the Spanish economy will create more than 600,000 jobs this year and start to chip away from next year at its debt mountain.
It has forecast the jobless rate to sink to 21.1 percent in 2015 and dip just below the symbolic 20 percent level in 2016.
It has raised its economic growth forecast for this year to 3.3 percent -- more than twice the 1.5 percent average rate forecast by Brussels for the eurozone.
Rajoy's conservative Popular Party is touting the recovery ahead of an election due from November, in which it faces a tough challenge from new anti-austerity parties.
He has warned Spain could tip back into crisis if rival parties force a change of course on the economy after the election.
Rajoy's government imposed tough spending cuts and tax rises from 2012 that it said were necessary to stabilise the public finances. Spain formally exited recession in 2013