If you search for free Japanese resources online, you're bound to run into Tae Kim's A Guide to Japanese Grammar on his website Tae Kim's Guide to Learning Japanese. It's fairly complete and does a decent job of explaining grammar concepts in a way anyone can understand. That said, Tae Kim's guide may not be ideal for curious learners who are seeking more in-depth explanations. The grammar explanations tend to be quite simple, often providing a one-to-one direct translation. That might be great as a starter, but if you wish to deepen your understanding on a specific grammar point, you may need to consult other grammar resources.
Be advised there are two sections to his site: The Grammar Guide and The Complete Guide. The Complete Guide covers most of the same material as The Grammar Guide, but with extras about the written language. Both guides are organized in a textbook-like fashion; you can absolutely substitute a beginner textbook for this grammar guide if you wanted. Lessons build on one another, and should cover the foundation of Japanese grammar.
Whichever of these two guides you use, they are great considering the amount of information you can learn, and they're absolutely free.