C&P below from the NFPA web site (publishers of the code) remember to use the version that is in use by your jurisdiction (2020 is the most recent publication) for the National Electric Code (NEC) use NFPA70 when searching Nfpa.org
To review codes and standards online:
Link Nfpa free widget free trial
View the list of NFPA's codes and standards.
Select the link of the code/standard # (first column).
Once on the specific page, click the "Free Access" button located under the title.
Use the pull-down feature to select the Free Access edition available.
Review the agreement terms.
Use the "Table of Contents" or the "Next" button (bottom of page) to view the chapters/sections.
Please note: You will be asked to "sign-in" or create a profile to access the code/standard in read-only format.
After you sign up if you go on and try the free widget or from the
Nfpa.org web page and sign up you can view the code but having a reference
Will help you get to the section you want
Note, my apprentice picked up a 2017 version for 10$ at a used book store
The current version is 2020 but some states are a few versions back, it can save you headaches just knowing the correct version to use. They are updated every 3 years.