.JS

Файл JS

JavaScript Source File
Задать вопрос
БЫСТРЫЙ ОТВЕТ

A JS file is a JavaScript source code file - plain, readable text that powers web page interactivity and server-side apps via Node.js. Open it in any code editor such as VS Code or Notepad++. On Windows, never double-click an unknown .js file: it executes through Windows Script Host with full system access, which is a real malware vector.

Разработчик: Brendan Eich / Netscape (1995); standardised by Ecma International (ECMAScript, ECMA-262) Категория: Интернет-файлы Открыть стандартное MIME: text/javascript
ОТКРЫВАЕТСЯ НА Windows macOS Linux Web
Связанные: .CRDOWNLOAD · .JNLP · .WEBARCHIVE · .PART

На этой странице

Проиндексировано расширений: 19k+
Последняя проверка: Jul 31, 2026

Не знаете, что это за файл?

Перетащите любой файл в наш идентификатор - мы прочитаем первые байты, чтобы определить формат.

Идентифицировать файл

Что такое формат файла JS?

.js files store source code written in the JavaScript programming language. .js code can be embedded on websites and used to verify input data, manipulate browser windows, or build interactive image galleries. While JavaScript began as chiefly a front-end technology, it now also runs server-side through runtimes such as Node.js, Deno, and Bun, making it a full-stack language. JavaScript code can be saved directly in HTML files, but such practice limits its portability. The more common solution is to use dedicated .js files that can be reused across many websites or projects.

JavaScript code does not require a Java virtual machine to be executed. JavaScript is not related in any way to the Java programming language - only the name is similar. .js code is not protected from viewing by users; the source is readable in any text editor or browser DevTools. Many .js files are freely available to the public and can be used on websites for free. Code in freely licensed .js files can be edited and redistributed under open-source terms.

Modern JavaScript supports two module systems: ES modules (using import/export, also distributed as .mjs files) and CommonJS (using require/module.exports). Data exchanged between scripts and servers is commonly stored as JSON. Projects that need static type checking use TypeScript, a typed superset that compiles back to .js.

Безопасность и защита

РИСК: HIGH

In a web browser, JavaScript runs in a sandbox and is relatively safe. The danger is on Windows: double-clicking a loose .js file runs it through Windows Script Host (WSH) with the full privileges of your account - no sandbox. Malicious .js attachments (often inside ZIPs, sometimes named invoice.js / document.js) are a well-known way to deliver ransomware and trojans. Rules: never double-click a .js you received by e-mail or download; open it in a text editor first to read it; keep Windows file extensions visible so a "photo.jpg.js" can't disguise itself. On the web, only load scripts from sources you trust and use Subresource Integrity (SRI) hashes for third-party scripts.

Детали формата

в двух словах
ПОЛНОЕ НАЗВАНИЕJavaScript Source Fileтакже известен как JavaScript file, ECMAScript source
РАЗРАБОТЧИКBrendan Eich / Netscape (1995); standardised by Ecma International (ECMAScript, ECMA-262)с 1995 (Netscape Navigator 2.0); ECMA-262 1st edition 1997
КАТЕГОРИЯИнтернет-файлы
MIME-ТИПtext/javascript
ТИПPlain-text program source code (scripting language)
СТАНДАРТОткрытый · без роялти
Это расширение также используется в…
  • JScript / Windows Script Host script - On Windows a .js double-click runs in WSH (cscript/wscript) with full system access - a classic malware vector, not a browser sandbox.
  • JACOsub / JetScript / Netscape config (legacy) - Old documentation listed .js for JACOsub subtitle scripts and Netscape settings; obsolete and effectively unused today.

Программы, открывающие файлы JS

Windows4 apps
Notepad Открытый код Right-click the file > Edit with Notepad++ to view/edit safely (never double-click an unknown .js).
Visual Studio Code Бесплатно File > Open; full syntax highlighting, IntelliSense and debugging. The standard JS editor.
Node.js Открытый код Run from a terminal: node script.js - executes the file with the V8 engine.
Web browser (Chrome, Edge, Firefox) Бесплатно JS runs automatically when its web page loads; open DevTools (F12) > Sources to inspect.
macOS3 apps
BBEdit Freemium Native macOS text/code editor with JS syntax highlighting.
Visual Studio Code Бесплатно File > Open; full syntax highlighting, IntelliSense and debugging. The standard JS editor.
Node.js Открытый код Run from a terminal: node script.js - executes the file with the V8 engine.
Linux3 apps
Visual Studio Code Бесплатно File > Open; full syntax highlighting, IntelliSense and debugging. The standard JS editor.
GNU nano / Vim / Gedit Открытый код Any text editor opens a .js; pre-installed on most distros.
Node.js Открытый код Run from a terminal: node script.js - executes the file with the V8 engine.
Web2 apps
CodeSandbox / StackBlitz Freemium Paste or upload .js to run and edit JavaScript projects entirely in the browser.
Browser DevTools Console Бесплатно Press F12 > Console to run JavaScript snippets live in any web page.

Технические подробности

глубокая спецификация
MIME typetext/javascript (primary); also application/javascript, text/ecmascript, application/ecmascript
Text encodingUTF-8 (required for ES modules and web delivery); legacy files may be ASCII or Latin-1
File signature (magic bytes)None - plain-text format; identified by .js extension and content, not header bytes
Container formatPlain text - human-readable statements, functions, and expressions executed top-to-bottom
Module systemsES modules (import/export) and CommonJS (require/module.exports); resolved via package.json "type" field
Execution environmentsAll major browsers (Chrome V8, Firefox SpiderMonkey, Safari JavaScriptCore) and server runtimes (Node.js, Deno, Bun)
Typical source size1 KB to a few hundred KB per file; production bundles can reach several MB
Production deliveryMinified (whitespace and identifier shortening), then gzip or Brotli-compressed for HTTP transfer
Integrity verificationSubresource Integrity (SRI) - sha256/sha384/sha512 hash in the HTML <script integrity="..."> attribute
Language paradigmMulti-paradigm: prototype-based object-oriented, functional, and event-driven
Disambiguating extensions.mjs (explicit ES module), .cjs (explicit CommonJS), .jsx (React JSX syntax), .ts (TypeScript superset)
Source visibilitySource is always human-readable; obfuscation is cosmetic, not cryptographic protection
Standardization bodyEcma International (TC39 committee) - ECMA-262 standard; new edition published annually
Shebang supportServer-side files may begin with #!/usr/bin/env node to run directly as a shell script
Source mapsMinified files pair with .map files (JSON) to map compiled output back to original source lines
Выпущен1995 (Netscape Navigator 2.0); ECMA-262 1st edition 1997
Последняя версияECMAScript 2025 (ES2025 / 16th edition); language is updated yearly
Открыть стандартноеДа · без роялти
Спецификацияtc39.es

Конвертации JS

Вопросы и ответы сообщества

спрошено пользователями
Задать быстрый вопрос
Получите помощь от людей, работающих с файлами JS. Будьте конкретны - укажите вашу систему и версию ПО.
Аккаунт не нужен · ответы обычно в течение дня

Вопросов пока нет - станьте первым, кто спросит о файлах JS.

Часто задаваемые вопросы

What program opens a JS file?
Any text/code editor reads and edits it - Visual Studio Code, Notepad++, Sublime Text, BBEdit. To run server-side JS, use Node.js (node file.js). In a web page, the browser runs it automatically.
Is it safe to open a JS file?
Reading one in a text editor is completely safe. Running one is not always: on Windows, double-clicking a .js executes it via Windows Script Host with full access. Never run a .js you got by e-mail or download - open it in an editor instead.
Is JavaScript the same as Java?
No. They share part of a name for 1990s marketing reasons but are entirely different languages with different runtimes and uses.
How do I run a JS file?
In a browser, link it from an HTML page with <script src> or paste it into the DevTools console (F12). On a computer, install Node.js and run 'node yourfile.js' in a terminal.
Why does my browser show JS code as text instead of running it?
Opening a .js URL directly just displays the source; JavaScript only executes when it's loaded by an HTML page via a <script> tag. The server must also send the correct text/javascript MIME type.
What's the difference between .js, .mjs and .cjs?
.js is a generic JavaScript file (treated as ES module or CommonJS depending on package.json). .mjs forces ES-module mode (import/export); .cjs forces CommonJS (require). All are JavaScript.

Ссылки

1MDN Web Docs - JavaScriptdeveloper.mozilla.org
2MDN - Subresource Integrity (SRI)developer.mozilla.org

Узнать больше

по всей базе данных

Популярные расширения на этой неделе

1.AQQAQQ Instant Messenger File
2.BINCD/DVD Disc Image (BIN/CUE)
3.MDMarkdown Document
4.PARTPartial Download File
5.RPMSGRestricted Permission Message
6.CRDOWNLOADChrome Partial Download File
7.NOMEDIAAndroid No-Media Marker File
8.PRDXSoftMaker Presentations Document
9.PRO6XProPresenter 6 Bundle File
10.SWFSmall Web Format (Shockwave Flash)

Похожие расширения

.CRDOWNLOADChrome Partial Download File
.JNLPJava Network Launch Protocol file
.WEBARCHIVESafari Web Archive
.PARTPartial Download File
.DOWNLOADPartial / Incomplete Download File
.ASPXActive Server Page Extended (ASP.NET Web Form)

Бесплатные инструменты для файлов

Идентификатор файлов и конвертер изображений в браузере - все работает на вашем устройстве.

Открыть инструменты

Обзор расширений файлов A-Z