Tech stocks remain one of the more popular investments in the market. Who doesn't like the prospect of investing in new and exciting technology that could change how businesses work or make life more convenient?

But plenty of tech stocks are fleeting successes and won't produce the returns investors expect. So if you're looking for brilliant choices to invest your money in the tech sector, look at these two stocks.

1. Cloudflare

The internet has become so ingrained in our lives that it's often taken for granted. But hosting a website isn't cheap; expensive networking equipment is needed and can quickly become outdated. That's where Cloudflare (NET 1.44%) comes in.

The company lets clients host their websites on its servers. This has multiple benefits, as Cloudflare has data centers in more than 285 cities globally. With an extensive global footprint, traffic can be directed to the closest data center, making the speeds much faster compared to hosting a website in one location. It also has strong cybersecurity, further bolstering its use case.

Nearly 170,000 customers have signed up for Cloudflare's services, with more than 60% of revenue coming from large customers: the 2,156 clients who pay more than $100,000 annually. This gives it a diverse clientele base, with large and small customers.

Even in a more challenging operating environment, Cloudflare has steadily grown its revenue, raising it 37% year over year to $290 million in the first quarter. Throughout 2023, though, revenue growth is expected to slow, with management forecasting 31% to 32% improvement. The company remains unprofitable, posting a $38 million loss in the first quarter for a 13% loss margin.

So why is this a smart buy when its revenue growth is slowing and it still isn't profitable? It's about opportunity.

Cloudflare's total addressable market is expected to rise to $204 billion by 2026 compared to its current $146 billion. While its current $1 billion run rate is a far cry from its maximum opportunity, it sees a large runway using artificial intelligence (AI), 5G, and the Internet of Things (IoT), which should help its growth to continue.

Although the stock remains pricey at 22 times sales, it has this huge opportunity, making the valuation a secondary consideration when assessing Cloudflare. This isn't a stock to go all-in on, but it is a smart purchase as it pursues its mission to "build a better internet."

2. CrowdStrike

CrowdStrike Holdings (CRWD 2.03%) helped usher in a new standard of cybersecurity. With its AI-powered platform, it analyzes trillions of signals weekly from across its customer base to determine what is normal activity and what constitutes a threat. Once a threat is detected, it can be isolated and stopped before significant damage is done, making it invaluable to all its clients in protecting against the next generation of cyberthreats.

This is the primary product CrowdStrike offers, although it has expanded to other areas like identity protection and threat intelligence.

Customers usually don't just stop at its primary offering. Instead, 62% of clients purchase at least five products, and 23% deploy at least seven. This land-and-expand model -- where CrowdStrike onboards a customer, then gets the client to add more products -- is a major growth driver.

This has translated into strong growth, with revenue in the first quarter of fiscal 2024 (ending April 30) rising 42% to $693 million. Management's guidance for the full year calls for a 35% rise in sales to $3.019 billion.

CrowdStrike posted its first net profit as a public company in the first quarter, generating $491,000 in income. But even though it has better financials than Cloudflare, its stock trades at a much lower valuation.

CRWD PS Ratio Chart

CRWD PS ratio, data by YCharts.

And CrowdStrike's total addressable market is expected to expand to $158 billion by 2026.

Both stocks should be bought with a long-term mindset, as their premium valuations will cause volatility. But each has excellent prospects, making them smart buys right now.