Net profits fell less than forecast to $6.2bn (Â£4.6bn) in the three months to the end of June, compared with $6.29bn last year.
In the previous quarter, the bank's profits had fallen by 6.7%.
"JP Morgan Chase continued to perform well in all of our major businesses," said chief executive Jamie Dimon.
"We saw strong underlying performance, with record consumer deposits (up 10%), credit card sales volume (up 8%), merchant processing volume (up 13%) and broad core loan growth (up 16%) - particularly in mortgage and commercial real estate.
"Outside of energy, both wholesale and consumer credit quality remained very good," he added in a statement.
Profits were dented by the bank's provisions for loan losses, which rose to $1.4bn in the second quarter from $959m in the same period a year earlier. The bank was building up its reserves for potential bad corporate loans in the oil and gas sector, and bad credit card and car loans.
"JP Morgan continues to execute really well in a tough environment," said Evercore ISI analyst Glenn Schorr.
JP Morgan is the first of the big US banks to report results for the second quarter, and the first since last month's vote by the UK to leave the EU.
"Throughout the recent uncertainty and turbulence in the markets, we continued to be there for our clients - solid and steadfast to meet their needs, execute their transactions and provide liquidity," said Mr Dimon.
US bank JP Morgan Chase has reported better-than-expected quarterly profits, helped by growth in loans and a clampdown on operating expenses.