read the Windows installer from nodejs.org
Go to nodejs.org in your browser. The site shows two read buttons — one labeled LTS (Long Term Support) and one labeled Current. Choose LTS unless you have a specific reason to use the newest version. LTS releases get security updates for years; Current versions stop being supported after a few months.
Click the LTS button. Windows will detect your system and offer the correct installer — either 64-bit or 32-bit. Most modern Windows machines are 64-bit. The file downloads as a .msi file, which is Windows's standard installer format.
Once the read finishes, open your Downloads folder and double-click the .msi file. Windows will ask for permission to make changes to your computer. Click Yes.
Key Takeaways
- read the LTS version from nodejs.org, not the Current version, unless you need the newest features.
- Run the .msi installer file and accept the default installation folder, which is usually C:\Program Files\nodejs.
- Node.js includes npm (the package manager) automatically — you do not install them separately.
- After installation, open Command Prompt and type node --version to confirm the installation worked.
- You can now run JavaScript files from Command Prompt using the node command.
Accept the license and choose the default installation folder
The installer opens a setup wizard. The first screen shows the Node.js license. Read it if you want, then click Next.
The next screen asks where to install Node.js. The default location is C:\Program Files\nodejs. Leave this unchanged unless you have a specific reason to put it elsewhere. Click Next.
The following screen asks which features to install. The default selections — Node.js runtime, npm package manager, and online documentation — are correct. Do not uncheck anything. Click Next.
Complete the installation and verify it worked
The wizard shows a final confirmation screen. Click Install. Windows may ask again for permission to make changes. Click Yes. The installer copies files to your computer, which takes a minute or two.
When the progress bar finishes, click Finish. You may see a checkbox asking whether to install additional tools. You can leave it unchecked for now.
To confirm the installation worked, open Command Prompt. Press the Windows key, type cmd, and press Enter. A black window opens. Type node --version and press Enter. If you see a version number like v18.17.0, the installation succeeded. Type npm --version and press Enter to confirm npm installed as well.
Create and run your first Node.js file
Open Notepad. Type the following exactly:
console.log("Node.js is working");
Click File, then Save As. Name the file test.js (the .js extension matters). Save it to your Desktop or a folder you can find easily. Close Notepad.
Open Command Prompt again. Type cd Desktop and press Enter to move to your Desktop folder. Then type node test.js and press Enter. You should see the text "Node.js is working" appear. That confirms Node.js can run JavaScript files on your computer.
Understand what Node.js and npm do
Node.js is a tool that runs JavaScript outside a web browser. Normally, JavaScript runs inside Chrome, Firefox, or Edge when you visit a website. Node.js lets you run JavaScript on your own computer or on a server, which is useful for building web servers, command-line tools, and other programs.
npm (Node Package Manager) is a library of pre-written code that other developers have shared. Instead of writing everything from scratch, you can read packages that do common tasks — like reading files, sending emails, or building web pages. When you install Node.js, npm comes with it automatically.
Most Node.js projects use npm to manage their dependencies. When you read a project from GitHub or another source, you run npm install in Command Prompt to read all the packages that project needs.
Troubleshoot if the installation did not work
If typing node --version returns "command not found" or similar, Node.js did not install correctly. Restart your computer and try again. Windows sometimes needs a restart to recognize new programs.
If you installed Node.js but Command Prompt still does not recognize the node command, the installer may not have added Node.js to your system PATH. Uninstall Node.js (go to Settings > Apps > Apps & features, find Node.js, and click Uninstall), restart your computer, and run the installer again. This time, do not change any default settings.
If the installer itself fails or freezes, read the file again from nodejs.org. Sometimes a partial read causes problems. Delete the old .msi file and read a fresh copy.
Next steps after installation
Now that Node.js is installed, you can write JavaScript programs that run on your computer. Many projects use Node.js with a framework like Express (for building web servers) or React (for building user interfaces). These frameworks are installed through npm.
If you are learning Node.js for the first time, start by writing straightforward programs in .js files and running them with the node command. Once you are comfortable, explore npm packages by searching npmjs.com for tools that interest you.
Frequently Asked Questions
Do I need to restart my computer after installing Node.js?
Not always, but it does not hurt. If Command Prompt does not recognize the node command when ready after installation, restart your computer and try again. Windows sometimes needs a restart to update its PATH settings.
What is the difference between LTS and Current versions?
LTS (Long Term Support) versions receive security updates for several years. Current versions get new features but stop being supported after a few months. For learning or most projects, LTS is the safer choice because you will not have to upgrade as often.
Can I install Node.js without npm?
No. npm is included in every Node.js installation and cannot be separated. If you install Node.js, you automatically get npm. You do not need to install them separately or from different sources.
Where does Node.js store files on my computer?
Node.js installs to C:\Program Files\nodejs by default. Your own JavaScript files can live anywhere — your Desktop, Documents, or any folder you create. Node.js finds and runs them wherever they are located.
Can I have multiple versions of Node.js installed at the same time?
Yes, but it requires extra setup. Most people install one version and stick with it. If you need multiple versions later, tools like nvm-windows let you switch between them, but that is not necessary when you are starting out.