Despite tenuous times for the banking industry, some of the largest U.S. lenders reported banner first-quarter earnings on Friday that easily exceeded investor expectations.

JPMorgan Chase, the nation’s largest bank, reported revenue that rose virtually across the board, helping it pull in $12.6 billion in profit, a 52 percent jump from the same quarter a year earlier. That’s a reflection both that higher interest rates, which are generally considered good news for the industry, and the fallout from the collapse of Silicon Valley Bank and Signature Bank last month appear to have strengthened the biggest banks.

JPMorgan’s customer deposits rose slightly in the first quarter from the previous quarter, compared with some smaller competitors who have seen depositors pull cash en masse.

“The banking situation is distinct from 2008 as it has involved far fewer financial players and fewer issues that need to be resolved, but financial conditions will likely tighten as lenders become more conservative, and we do not know if this will slow consumer spending,” Jamie Dimon, the JPMorgan chief executive who has taken a leading role in bailing out smaller lenders, said in a statement.

Wells Fargo also surpassed analysts’ expectations, reporting a profit of nearly $5 billion in the first quarter, a 32 percent increase from a year ago. Rising interest rates lifted the bank’s earnings as its loan portfolio grew, led by gains in personal lending and higher credit-card balances.

There was little sign of nervous depositors fleeing to the safety of the lender, the nation’s fourth-largest bank. Deposits at Wells Fargo dropped $24 billion, or 2 percent, from the previous quarter.

Charlie Scharf, the bank’s chief executive, said Wells Fargo was “glad to have been in a strong position to help support the U.S. financial system” during the industry’s recent turmoil. The bank’s top priority, he said, remains improving its internal controls; the bank has for years been battered by regulators and has paid billions in fines for a wide variety of misdeeds.

PNC Financial, the country’s sixth-largest bank, said that the industry volatility ended up playing to its strengths. Although it has been swept up in the turmoil surrounding midsize banks, PNC, a so-called super regional lender, is bigger and more diversified than its smaller rivals. PNC played savior in last month’s rescue plan for the ailing First Republic Bank, putting $1 billion in deposits into the bank as part of a $30 billion deal engineered by Mr. Dimon.

PNC’s deposits grew slightly last quarter — but were down compared with a year ago — as its net income rose to $1.7 billion, up 9 percent. Its revenue dropped 3 percent, to $5.6 billion, which the bank attributed in part to higher funding costs.

“The banking system is very sound — it’s stable,” Lael Brainard, director of President Biden’s National Economic Council, said this week at an event in Washington. “The core of the banking system has a great deal of capital.”

But staff at the Federal Reserve projected that general banking turmoil would spur a recession later this year, according to minutes of a policymakers’ meeting last month. “Given their assessment of the potential economic effects of the recent banking-sector developments, the staff’s projection at the time of the March meeting included a mild recession starting later this year with a recovery over the subsequent two years,” the minutes showed.