The federal agency said it was the fourth month in a row that the value of building permits increased.
Gains in building permits were posted in five provinces in July, led by Ontario, followed by British Columbia and Manitoba.
Economists had expected a drop of 6.8 per cent, according to Thomson Reuters.
"After two blistering months earlier this summer, the consensus view was that Canadian building permits were poised for a breather," CIBC economist Nick Exarhos wrote in a note to clients.
"However, underestimating the resiliency of the Canadian building sector is becoming a dangerous game for forecasters."
Statistics Canada said the increase in July resulted primarily in a boost in plans for multi-family buildings in Ontario and British Columbia, as well as institutional buildings in Manitoba.
The value of non-residential building permits was up 5.2 per cent to a record high $4.2 billion in July, the fourth consecutive monthly gain.
Meanwhile, the value of residential building permits was up 18.0 per cent to $5 billion in July, up for the fifth month in a row.
The value of building permits for multi-family dwellings rose 43.4 per cent to $2.5 billion in July, after a 4.5 per cent drop the previous month, driven by apartment and condominium projects in Ontario, British Columbia and Alberta.
Single-family homes totalled $2.4 billion in July, a decrease of 0.5 per cent, after three consecutive monthly increases.
Statistics Canada said the value of permits was up in 21 of the 34 census metropolitan areas in July.