.js
💻 CodeText-based

.js File — JavaScript Source

text/javascript

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

JS

Drop a .js file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/javascript

Quick Facts

Extension.js
Full NameJavaScript Source
MIME Typetext/javascript
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 500 KB
First Appeared1995

What Is a .js File?

JavaScript is the most widely used programming language in the world, powering virtually every website and an increasingly broad range of applications. JS files contain source code written in JavaScript, a high-level, interpreted, dynamically-typed programming language originally created by Brendan Eich at Netscape in 1995. JavaScript was designed for client-side web scripting but has expanded far beyond the browser — Node.js enables server-side development, React Native and Electron power desktop and mobile applications, and JavaScript is used in IoT devices, game engines, and machine learning. The language supports object-oriented, functional, and event-driven programming paradigms. Modern JavaScript (ES6+) includes features like classes, modules, arrow functions, async/await, destructuring, template literals, and iterators. The JavaScript ecosystem is the largest in software development, with npm hosting over 2 million packages. JavaScript files are typically served to browsers either directly or after bundling and minification by tools like webpack, Vite, or esbuild for production deployment.

How to Open .js Files

VS Code
WebStorm
Sublime Text
Atom
vim
any text editor
Node.js (execution)

Related File Extensions

More Code File Extensions

Other code formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.