Inflation, which hit a 31-year high in the U.S. last month, is causing major growing pains for tech stocks. In addition to causing component and labor costs to rise, rising inflation also reduces the value of a company's long-term growth in revenue, free cash flow, and earnings.

Some investors might be tempted to sell all of their tech stocks as those headwinds intensify. But as I mentioned in a recent article, investors should merely be more selective with their tech investments instead of tossing out all their babies with the bathwater. Let's take a look at three dependable tech stocks that should remain resilient in an inflationary environment.

Two stunned shoppers look at a receipt.

Image source: Getty Images.

1. Amazon

Amazon (NASDAQ:AMZN) is well insulated from inflation for three simple reasons. First, higher prices at brick-and-mortar retailers should drive consumers to buy cheaper products from Amazon's online marketplaces.

Second, Amazon locks in customers with its Prime ecosystem, which provides exclusive discounts, free shipping options, and other perks to more than 200 million subscribers. That ecosystem will likely get stickier and attract even more shoppers as inflation worsens.

Lastly, Amazon can afford to sell its products at lower prices because it generates most of its profits from its higher-margin cloud business, Amazon Web Services (AWS), instead of its lower-margin marketplaces. As the world's largest cloud infrastructure platform, AWS has plenty of pricing power because its clients won't unplug their cloud services simply because their other costs are rising.

The symbiotic relationship between those two growing businesses should make Amazon an inflation-resistant play, even as its retail business faces difficult near-term comparisons as a result of the pandemic. Amazon's stock might not seem cheap at 55 times forward earnings right now, but its resilience in an inflationary environment could easily justify that slight premium.

2. Salesforce

Salesforce (NYSE:CRM) is another cloud software leader that won't need to fret over inflation. It operates the world's largest cloud-based customer relationship management (CRM) platform, which enables large customers to track and analyze all of their customer relationships. It also cross-sells additional marketing, e-commerce, analytics, and app development services to lock its clients into its cloud-based ecosystem.

Salesforce's near-term earnings growth has been a bit bumpy, mainly due to its $27.7 billion acquisition of the enterprise communications platform Slack and some accounting changes related to its investments.

However, the tech giant has also repeatedly reiterated its goal of nearly doubling its annual revenue from $26.4 billion this fiscal year (2022) to over $50 billion by fiscal 2026. Salesforce expects that growth to be driven by a growing need for its services across a wide range of industries.

In addition to tracking customer relationships, Salesforce's services can help a company streamline its operations, reduce its dependence on human employees for certain tasks, and make better data-driven decisions. The market's demand for those services should remain resilient -- regardless of the inflationary headwinds -- and give Salesforce plenty of pricing power.

Salesforce's stock also trades at 55 times forward earnings. But like Amazon, it's an evergreen tech stock that deserves to trade at a higher valuation.

3. Palo Alto Networks

Lastly, market-leading cybersecurity companies are resistant to inflation, since companies will continue to pay for their services regardless of the macroeconomic challenges. However, investors should generally avoid cybersecurity stocks that trade at sky-high valuations, since rising interest rates (which counter inflation) can crush pricey growth stocks.

Therefore, investors should seek out cybersecurity companies that offer a good balance of growth and value. My personal favorite is Palo Alto Networks (NASDAQ:PANW), a market leader in on-site firewall appliances, which aggressively expanded its cloud and AI ecosystems over the past two years with big acquisitions.

Palo Alto currently serves over 85,000 customers across more than 150 countries. That's up from just over 9,000 customers in over 100 countries at the time of its IPO nine years ago. It expects its revenue to rise 26%-27% this year, with most of that growth coming from its newer cloud and AI services, and for its adjusted earnings to grow 16%-18%.

Palo Alto's stock might seem a bit expensive at 76 times forward earnings, but many investors value cybersecurity companies based on their revenues instead of their profits. By that measure, Palo Alto trades at just eight times next year's sales -- which makes it a bargain compared to richly valued cybersecurity companies like CrowdStrike and Cloudflare.

 
This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.