The results put to rest lingering concerns about how the rise of mobile might impact Google, which has a strong mobile presence with its Android smartphone operating system but has long relied on desktop search traffic to power its profits.
Advertisers typically pay less for user clicks on mobile ads than on desktop ads, Google's traditional strength, but the strong earnings performance suggests that is beginning to change, said Colin Gillis, an analyst with BGC Partners.
"They’re doing an excellent job of pulling the mobile landscape through to being more efficient," Gillis said.
Alphabet said revenue grew by 21.3 percent to $21.5 billion, while earnings jumped to $4.88 billion from $3.93 billion for the comparable period a year ago.
The company's shares rose 6.5 percent to $816 in after-hours trading on Thursday.
Robust gains in the red-hot video market also drove the company's growth, Google Chief Executive Officer Sundar Pichai said during a call with investors. Over the past year, Google, Facebook and Twitter have all doubled down on video, a format where advertisers are willing to pay a premium for a few seconds of users' undivided attention.
Google has used artificial intelligence to improve video recommendations to users, driving more engagement on the site, Pichai said.
"Video is a huge component of digital content, and YouTube continues to shine," he said. "It’s a thriving home for creators."
Google and other tech players are hoping to siphon advertising dollars from traditional television, where advertisers will spend a projected $70.6 billion in the U.S. this year, according to market research firm eMarketer. YouTube is in a prime position to strike, with an audience of more than 1 billion users, including more 18-34 and 18-49 year-olds than any U.S. cable network.
Google faced heightened pressure to deliver after Facebook, its chief competitor in mobile advertising, reported a 63 percent increase in total advertising revenue on Wednesday, sending its shares to an all-time high.
The rivalry between the companies has intensified as advertisers shift more of their budgets toward mobile. But Google's healthy performance shows there is room for both to thrive in the burgeoning market, said analyst Bob O'Donnell of TECHnalysis Research.
"The back-to-back, stellar earnings by both Google and Facebook highlight the continued growth of online advertising and its impact on more traditional media," he said.
Revenue at Alphabet's Other Bets business rose 150 percent to $185 million, while operating losses widened to $859 million.
The division includes broadband business Google Fiber, home automation products Nest, self-driving cars and X – the research facility that works on "moon shot" ventures.
"I’ve commented many times that our focus on long-term revenue growth does not give us a pass on managing expenses," she told investors.
Google's ad revenue rose 19.5 percent to $19.14 billion, while it notched a 29 percent rise in paid clicks, where advertisers pay the company only if a user clicks on the ad.
Google's other revenue surged 33 percent, driven by gains in the cloud computing business, in which Google competes with Microsoft and Amazon to rent computer servers to other companies. Former VMware CEO Diane Greene, who began leading Google's cloud business last year, has streamlined engineering efforts and appointed new leadership, helping the company get more traction with clients, Pichai said.
"It's a big set of changes, and it's obviously having an impact," he said.
Although Google continues to expand its advertising business, the falling cost-per-click on advertisements is cause for concern, said analyst Patrick Moorhead of Moor Insights & Strategy.
"Advertisers aren’t willing to pay as much for Google advertising," he said.
Excluding items, Alphabet earned $8.42 per share, beating analysts average estimate of $8.04, according to Thomson Reuters I/B/E/S.