Just got into Tolkien last year, and figuring out where to read this legally was its own little adventure. A lot of folks jump straight to Audible for the audiobook, which is fantastic, but if you want the actual text online, your most reliable route is probably through a library.
I used Libby with my local library card and was able to borrow the ebook version to read in my browser. It's the full, official text, no weird formatting issues. The waitlist can be a thing depending on your library, though. Also, major ebook retailers like Google Play Books or Amazon let you buy it outright. You can read samples there in your browser before committing, which is nice for checking the prose style.
Not gonna lie, I still ended up buying a paperback for the maps and appendices. Some books just feel different in hand, you know?