Environmental, social, and governance (ESG) investing has become an increasingly popular trend. According to a recent report by Morningstar, net ESG fund inflows reached $51.1 billion in 2020 (a fourth of net bond and stock flows in the U.S.), compared to just $21.4 billion in 2019 and $5.4 billion in 2018. Small and large publicly traded companies now file annual ESG reports in addition to their regular annual reports. These reports vary by industry, but the intention is to measure and track a company's impact on the planet, people, and the fairness of its business practices (compensation, voting rights, etc.). Equinor (NYSE: EQNR) and NextEra Energy (NYSE: NEE) lead their respective industries in these categories. Here's what makes both companies great ESG stocks to buy right now. Image source: Getty Images. A quick primer ESG investing shouldn't be confused with green energy. Since ESG criteria vary by industry, a solar company isn't automatically given a high rating, just as an oil and gas giant isn't automatically given a low rating. For example, MSCI -- a leading global research and financial products company -- issues ESG ratings ranging from CCC to AAA. Two of the largest pure-play solar companies, SolarEdge Technologies and Enphase Energy, have BB ratings and are considered to be average in their industry, whereas a company like Equinor has a perfect AAA rating and leads integrated oil and gas companies. To put it plainly, ESG investing is about rewarding principled companies that are making an effort to serve all of their stakeholders. The energy play: Equinor Equinor is one of the largest integrated oil and gas majors in the world, meaning it produces, transports, and refines petroleum products. Equinor is a critical source of Norway's wealth as the Norwegian Ministry of Petroleum and Energy owns more than two-thirds of Equinor's shares. In an effort to decrease emissions and look for a revenue source other than oil, Equinor has been an adamant investor in offshore wind energy, which aligns with Norway's aggressive environmental targets. With over 50 years of experience drilling for oil in the high seas, it makes sense that Equinor would choose offshore wind as its renewable energy investment of choice. Equinor has cut its oil and gas budget substantially in favor of renewable investment. The result is a low-cost oil and gas portfolio compared to its competitors'. This efficiency paired with rising oil and gas prices puts Equinor on track to generate some of its highest free cash flow in history. With Equinor's plans to be one of the world's leading offshore wind energy operators, you may think that the environmental component is what's carrying its AAA ESG score. However, many of its wind projects are still in the early stages, and its current renewable capacity is actually quite low (only about 500 megawatts). Interestingly enough, Equinor's high score has more to do with its social and governance efforts than environmental stewardship. Although Equinor had top scores on toxic emissions and waste management, it ranked average in the other two environmental criteria (biodiversity/land use and carbon emissions). With such solid "S" and "G" scores and renewable investments under way, Equinor is likely to lead oil majors in ESG ratings for years to come. Image source: Getty Images. The utility play: NextEra Energy America's largest utility by market cap is part of just a handful of utilities with a AAA ESG rating from MSCI. Utility operators manage and fund projects that produce energy and sell it to the grid. Therefore, their ESG criteria are pretty straightforward. If they can produce energy from renewable sources, that's better for the planet. And if they can do it in a socially responsible way with good corporate governance, that's even better. Investors familiar with NextEra Energy know that the company has invested heavily in clean energy and carbon reductions. The result has been a 52.2% decrease in carbon emissions between 2005 and 2019 and a 67.5% increase in clean electricity generation. By 2025, NextEra plans to reduce carbon emissions by two-thirds from its 2005 baseline despite a doubling in its electricity generation over that 20-year time frame. NextEra is a great example of a natural gas utility that embraced renewables. Its renewable capacity is quickly gaining speed and is set to eclipse its natural gas capacity in just a few years. Regulated revenue streams add predictability to NextEra's business model. However, heavy spending has taken a toll on the company's performance. Over the last five years, revenue and net income have been nearly flat, while capital expenditures rose close to 60%. NEE Revenue (Annual) data by YCharts Investors have accepted short-term mediocre performance in favor of long-term growth. NextEra has been a Wall Street darling, handily outperforming the utility sector and the S&P 500 over the last five years. NextEra remains a top-tier ESG stock and an excellent wind energy stock to build a portfolio around. NEE Total Return Level data by YCharts A dynamic duo Equinor and NextEra energy are two examples of companies with roots in fossil fuels that are expanding into renewable energy. However, their AAA ESG scores are due to a lot more than just this environmental push. Equinor has a low-cost, cash cow oil and gas portfolio paired with renewable upside. NextEra energy is my best energy stock for 2021 because it's laying the groundwork for decades of earnings growth from renewable energy sources. Both companies have dividend yields over 2% and are likely to raise their dividends this year. 10 stocks we like better than NextEra EnergyWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, Motley Fool Stock Advisor, has tripled the market.* David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and NextEra Energy wasn't one of them! That's right -- they think these 10 stocks are even better buys. See the 10 stocks *Stock Advisor returns as of February 24, 2021 Daniel Foelber owns shares of Equinor ASA and has the following options: short April 2021 $17.5 calls on Equinor ASA. The Motley Fool recommends NextEra Energy and SolarEdge Technologies. The Motley Fool has a disclosure policy.Source