Former Vice President Joseph R. Biden Jr. and President Trump combined with the Democratic and Republican Parties to raise well over a quarter-billion dollars in June, setting new high-water marks for both men in 2020 and obliterating June fund-raising records from previous presidential cycles.

Mr. Biden and Mr. Trump each raised more last month than what Mr. Trump and Hillary Clinton combined to collect in June 2016 — a sign of the dizzying costs of a 2020 campaign that is already saturating the airwaves and screens in the most crucial battleground states.

For the second consecutive month, Mr. Biden’s haul ($141 million) was bigger than Mr. Trump’s ($131 million), a striking reversal after Mr. Biden had financially limped and skimped through much of 2019 and early 2020.

Mr. Biden had raised less than $9 million in a month as recently as January. But the former vice president’s upward trajectory has been dizzying ever since he became the presumptive Democratic nominee this spring: He raised just over $60 million with the Democratic National Committee in April, $80.8 million in May and then $141 million in June.

“These numbers are pretty astonishing,” said Catherine Gabel, a Democratic digital strategist who specializes in online fund-raising.

If Mr. Biden’s newfound gusher of money was the biggest story line of the latest fund-raising figures, the resilience of Mr. Trump’s donors despite a tumultuous month of bad headlines and even worse polling indicated that both sides are likely to be awash in money all the way through the November election. Record amounts arrived for both campaigns despite the continuing economic suffering brought on by the coronavirus pandemic.

“What is happening for both parties is each side recognizes all the chips are in the middle of the table,” said Jeff Roe, a top Republican strategist who served as campaign manager for Senator Ted Cruz’s 2016 presidential bid. “This is not a small-ball election with little things being debated at the edges.”

Mr. Roe added: “Even if you’ve lost your job, that’s worth $38 to put your finger on the scale and try to decide the future of the country. You don’t have to wait until November. You can impact it now.”

Top Democratic donors, fund-raisers and strategists said the biggest difference for Mr. Biden was that he is now running against only Mr. Trump, instead of his fellow Democrats, and is able to draw support from the full diverse spectrum of the party. Many donors, big and small, are unnerved and fearful of Mr. Trump’s re-election chances, even as Mr. Biden has widened a sizable polling advantage, leading by 14 percentage points nationally in a recent New York Times/Siena College poll.

“I think Democrats have been wrong about enough elections at this point that there is nothing that’s going to alleviate the concerns,” said Tom Steyer, a billionaire and top Democratic donor who ran for president this year and was a co-host of a recent fund-raiser for Mr. Biden. “There’s no choice but to run through the tape.”

Credit…Erin Schaff/The New York Times

Mr. Trump still maintains an enviable war chest that now stands at $295 million. The Biden campaign has declined to disclose a full accounting of its cash on hand, but past spending patterns suggest the former vice president has sharply cut into Mr. Trump’s lead even as he remains significantly behind the president.

“It’s increasingly clear that we’re going to be highly competitive with our resources against Trump,” Jennifer O’Malley Dillon, Mr. Biden’s campaign manager, said in a recent interview before the latest figures were released. “But the more important thing is how you’re using those resources, and using them well.”

For a Biden campaign that entered April $187 million behind Mr. Trump and the Republican National Committee, the possibility of attaining financial parity, or even just approaching it, is a notable transformation.

“We won’t lose because of money — I’m absolutely sure,” said Ed Rendell, a former Democratic governor of Pennsylvania who co-hosted a fund-raiser for Mr. Biden last month. “Four months ago, I was worried.”

Neither the Biden nor the Trump campaign broke down how much of the money came from large contributors versus online grass-roots giving (a full report is required later in July), though both campaigns emphasized that they were relying heavily on small-dollar donations. Mr. Trump held only two in-person fund-raisers in June; Mr. Biden held zero in-person fund-raisers but averaged more than one big-dollar virtual fund-raiser every other day.

Mr. Biden’s June virtual fund-raising calendar was punctuated by major events headlined by former President Barack Obama, Senator Elizabeth Warren of Massachusetts and Senator Kamala Harris of California. But he was also hosted by leading Wall Street figures, including Hamilton E. James, the executive vice chairman of the Blackstone Group, and Hollywood titans like Jeffrey Katzenberg, the film producer.

Helping pad Mr. Biden’s recent hauls has been the fact that, as the presumptive nominee, he can raise money in tandem with the Democratic National Committee, swelling the size of checks he can accept from $2,800 during the primary to more than $620,000 now. Mr. Trump has been raising such $500,000-plus checks for months, including some at a small dinner in June that raised $10 million.

In fact, Mr. Biden’s June fund-raising haul was so large that, as the end of the month neared, a signal was received by some donors to hold their checks until July, according to two people familiar with the matter.

The sums that both campaigns took in last month were enormous historically. Mrs. Clinton did not raise $140 million until two months deeper in the cycle, in August 2016. That year, Mr. Trump never raised as much in a month as he did in June 2020. And the totals for both campaigns this June were greater than President Barack Obama and Mitt Romney posted in June 2012.

Mr. Biden’s campaign highlighted that it had added 2.6 million people to his email list in June, and that 68 percent of his contributors last month were new to his campaign. In May, half of Mr. Biden’s contributors were new, too, as the party base unified behind him.

“The enthusiasm is reflected both in polls and the fund-raisers,” said David Cohen, a top Comcast executive who hosted Mr. Biden’s first fund-raiser on the day he entered the race. “Right now, Joe Biden has an appeal. People in this country are tired about being embarrassed about this president.” Mr. Cohen added that there had been “a bit of a stampede at the grass-roots level.”

The Biden team is looking for even more. The campaign has recently been shopping around to find a new vendor that would replace the firm Anne Lewis Strategies to find new supporters online, according to people familiar with the matter.

Hollywood stars, musicians and other celebrities have lent Mr. Biden a hand, too.

Barbra Streisand (“I have every single album you have ever, ever made,” Mr. Biden told her), Willie Nelson (“An unadulterated fan,” Mr. Biden declared), John Legend, Andra Day, Jennifer Hudson, Mark Hamill, James Taylor, Forest Whitaker and Yo-Yo Ma have all made virtual appearances at recent Biden events.

“We’re depending on you to bring it all back together, Biden,” Ms. Hudson told the former vice president.

On Wednesday, Biden officials were downright gleeful, after Mr. Trump’s campaign first boasted of its $131 million haul. In particular, the president’s campaign manager had said on Twitter that Americans were “voting with their wallets.”

“Emojis won’t do justice to the emotions I felt when I saw the arrogance of this tweet,” wrote Rufus Gifford, Mr. Biden’s deputy campaign manager, and a former finance director for Mr. Obama, “knowing that we beat them.”