By Ryan Tracy

WASHINGTON -- The chief executives of Amazon.com Inc., Facebook Inc., Apple Inc. and Alphabet Inc.'s Google faced relentless criticism at a congressional hearing Wednesday, with Democrats and Republicans alike challenging their business practices over more than five contentious hours.

The session, conducted via videoconference because of the coronavirus pandemic, laid bare deep-rooted frustration with some of the country's most successful companies, at a moment when Americans rely on them more than ever.

It also highlighted the threat to the companies from ongoing investigations by antitrust authorities, with lawmakers citing internal company emails and witness interviews as evidence that the platforms improperly abuse their dominant position.

The tone of the questions, directed at Amazon's Jeff Bezos, Facebook's Mark Zuckerberg, Apple's Tim Cook and Google's Sundar Pichai, was almost universally hostile. Rep. David Cicilline (D., R.I.), chairman of the House Antitrust Subcommittee, kicked off the hearing by declaring: "Our founders would not bow before a king. Nor should we bow before the emperors of the online economy."

The executives defended their companies' practices and said that they face stiff competition that forces them to serve customers and innovate.

Lawmakers whipsawed between topics, from how the companies moderate social media posts to the tactics they used to gain sizable positions in markets from digital advertising to e-commerce. The CEOs had sought to testify jointly, a tactic that made it harder for the interrogators to sustain pressure on any one witness.

Mr. Zuckerberg faced a series of questions about Facebook's acquisition strategy. Mr. Pichai defended Google from a litany of accusations, ranging from taking advantage of its dominant online search engine to its work in China.

Lawmakers in both parties accused Mr. Bezos of presiding over bullying of independent sellers on the Amazon marketplace, citing reports in The Wall Street Journal that employees had used seller data to launch competing products.

Apple got fewer questions than the other companies, with Mr. Cook defending its policies on its App Store.

Republicans appeared more skeptical of an antitrust crackdown, with the top GOP member of the subcommittee, Rep. James Sensenbrenner (R., Wis.), saying he wouldn't support a change in competition laws to deal with large tech platforms.

"In America you should be rewarded for success," he said.

GOP lawmakers directed a series of questions at Google, and to a lesser extent Facebook, for a perceived mistreatment of conservatives on social media. "Big tech is out to get conservatives," said Rep. Jim Jordan (R., Ohio). "If it doesn't end, there have to be consequences."

President Trump also weighed in on the topic Wednesday, tweeting, "If Congress doesn't bring fairness to Big Tech, which they should have done years ago, I will do it myself with Executive Orders."

The CEOs rejected the accusations, saying they strive to remain politically neutral and focus on serving consumers, not denying access to rivals.

Mr. Bezos, in his first appearance before Congress, told lawmakers about his parents and his decision to leave a Wall Street job to start Amazon from a Seattle garage.

"The retail market we participate in is extraordinarily large and competitive," he said, addressing broader concerns about Amazon's power. "There is room in retail for multiple winners."

Rep. Pramila Jayapal (D., Wash.), who has Amazon's headquarters in her district, asked Mr. Bezos whether Amazon employees violated an internal policy against accessing data from independent sellers.

"I can't guarantee you that this policy has never been violated," Mr. Bezos said. He said Amazon wants third-party sellers to succeed and benefits when consumers have more options.

After Rep. Lucy McBath (D., Ga.) played an audio recording of an Amazon seller who said her business nosedived after an action by Amazon, Mr. Bezos said: "I'm surprised by that. It's not the systematic approach that we take, I can assure you."

House Judiciary Committee Chairman Jerrold Nadler (D., N.Y.) took on Mr. Zuckerberg, quoting documents of him describing Instagram as a threat before Facebook acquired it in 2012. "Instagram can hurt us meaningfully, " Mr. Zuckerberg wrote in one of the emails.

"This is exactly the type of anticompetitive acquisition that the antitrust laws were designed to prevent," Mr. Nadler said.

"I think the FTC had all of these documents" when it reviewed the acquisition for compliance with antitrust laws, Mr. Zuckerberg shot back, referring to the Federal Trade Commission. Some FTC officials in 2012 thought the deal raised antitrust concerns, but they worried they might not win an antitrust case in court if they sued to block the deal, the Journal reported last year.

Mr. Zuckerberg defended Facebook's efforts to regulate false information on its platform, denying that the company has a dominant market position or profits from misleading viral content. He said new competitors companies are emerging all the time. "History shows that if we don't keep innovating, someone will replace every company here today," he said.

Mr. Cicilline accused Google of abusing its position as a web gateway, saying it changed "from a turnstile to the rest of the web to a walled garden." He quoted one internal memo that he said showed Google employees discussing how other websites had "too much traffic."

Mr. Pichai said he wasn't familiar with the specific document, but he pointed to competition in online search, such as searches for specific items on travel or retail websites, a sector known as "vertical search." "When we look at vertical search, it validates the competition that we see," he said.

Several Republicans criticized Google for abandoning some work with the Pentagon, and repeated concerns among some in the Trump administration about the company's work in China.

"It seems to really call into question your commitment to our country and our values," said Rep. Matt Gaetz (R., Fla.).

Mr. Pichai said the company doesn't work with the Chinese military. "Compared to our peers it is very, very limited in nature," he said of the company's work in China.

Apple got fewer questions about China, despite its large presence there. Rep. Hank Johnson (D., Ga.) questioned Mr. Cook about whether Apple treats app developers equally, echoing complaints from app developers about Apple's market power. He cited Apple's moves to take a lower cut of some App Store sales from Amazon and to allow China's Baidu Inc. to fast-track app approval.

Mr. Cook stood by Apple's defense that it treats every developer the same and cited the opportunity provided by the App Store's growth. "If Apple is a gatekeeper, what we have done is open the gate wider," Mr. Cook said. He acknowledged that he didn't know about the Baidu situation and said, regarding Amazon, that lower rates are available to "anyone meeting the conditions."

The hearing was marked by lawmakers interrupting witnesses before they finished their responses. Mr. Bezos' video feed went out early in the session, causing Mr. Cicilline to call a recess. At the outset, instead of asking the witnesses to stand and swear to tell the truth, Mr. Cicilline had a different request: "Unmute your microphones and raise your right hands."

--John D. McKinnon, Tripp Mickle and Brent Kendall contributed to this article.

Write to Ryan Tracy at ryan.tracy@wsj.com