Economists had expected a contraction of 0.1 per cent, which would have caused the country to slide into recession. In the first quarter of 2015 the economy shrank 0.2 per cent.
But growth in the second quarter was driven by an uplift in consumer spending, the official figures suggested, offsetting the effect of a strong franc.
In June the Swiss National Bank (SNB) decided to maintain a negative interest rate of 0.75 per cent, effectively charging depositors to keep money in banks.
The SNB introduced the rate in December to help weaken the Swiss franc over time, but in January it scrapped its currency ceiling, which capped the franc's value against the euro.
Around 40 per cent of Switzerland's exports go to the Eurozone - the highly valued franc had hurt exporters.
Goods and services had also become more expensive for the Swiss, who had "taken to crossing the border to shop more cheaply in France, Italy and Germany," the Financial Times reported.