.js — JavaScript Source Code
Source code written in JavaScript, the programming language of the web. Runs in browsers natively and, via Node.js, on servers and the command line too.
Also known as: .mjs, .cjs
Scripts can run commands on your computer when executed. Only run scripts from sources you trust, and review the contents in a text editor first if you're unsure.
Check another filename
File extension lookup
Frequently asked questions
What is a .js file?
Source code written in JavaScript, the programming language of the web. Runs in browsers natively and, via Node.js, on servers and the command line too.
Can I edit a .js file?
Yes — .js files are commonly editable with software such as Any web browser.
Does having a .js extension mean the file is safe?
No single extension can guarantee that. Scripts can run commands on your computer when executed. Only run scripts from sources you trust, and review the contents in a text editor first if you're unsure. Always consider where the file came from, not just its name.