Alphabet beat analysts' revenue estimates and nearly surpassed the sales record it set in the fourth quarter.
Google ad sales jumped 32 percent in the first quarter compared with a year ago, above expectations of analysts tracked by Refinitiv. Cloud sales increased 45.7 percent, in line with estimates.
The results provided the first sign that Google services such as search and YouTube may hold on to gains made since lockdowns and other pandemic restrictions forced people to shop and communicate online over the last year.
Alphabet Chief Financial Officer Ruth Porat told analysts: "It's too early to forecast the extent to which these changes in consumer behaviour and advertising spend will endure."
Google Chief Business Officer Philipp Schindler and Porat declined to comment on whether Google had seen a recovery in spending by travel and other industries that were major customers before the pandemic.
Alphabet's overall quarterly sales rose 34 percent to $55.3 billion, above analysts' estimate of 26 per cent growth from a year ago and close to the $56.9 billion it reported in the fourth quarter. Revenue benefited by an unspecified amount from Google's acquisition of smartwatch maker Fitbit in January.
Alphabet's quarterly profit was $17.9 billion, or $26.29 per share, beating estimates of $15.88 per share and topping its previous high of $15.2 billion last quarter.
But nearly $4 billion of earnings came from unrealized gains in venture capital investments and recalculating depreciation of some data centre equipment.
The high sales pushed operating margins up to 30 percent for the first time since incorporating as Alphabet in 2015 even as its costs began to pick up again for hiring, legal matters and building out new facilities. Alphabet in 2020 suffered its slowest sales growth in 11 years but posted record profit and boosted its cash hoard by $17 billion after slowing hiring and construction.
The share repurchase authorization by Alphabet's board follows a $25 billion buyback program announced in 2019. Jefferies analyst Brent Thill estimated Alphabet now has $56 billion left to spend buying its shares.
Google's ad business, the global market leader as measured in sales, accounted for 81 percent of Alphabet's first-quarter revenue.
Schindler said retail, technology and consumer product companies were among big search advertisers in the quarter.
Google Cloud narrowed its operating loss to 44 percent to $974 million in the first quarter.