.js · 100% private

Open JS files online

Drop a JS file to preview it instantly in your browser. Free and private: your file is never uploaded, and no account is needed.

Drop your JS file here
or click to browse your device
file
Preview
Drop a file on the panel above to begin
Files never leave your device No sign-up, no account Free forever

What is a JS file?

A JS file contains JavaScript, the programming language that makes web pages interactive and also runs on servers through Node.js.

Sharing a script as a file is common for bug reports, snippets and bundles. Unknown scripts should never be run before reading them.

Full nameJavaScript Source File
File extension.js
MIME typetext/javascript
Developed byBrendan Eich at Netscape (standardised as ECMAScript)
Introduced1995

How to open a JS file online

  1. Drop the file. Drag your .js file onto the panel at the top of this page, or click it to pick the file from your device.
  2. See it instantly. Your browser reads the file locally and shows the preview in a second or two.
  3. View full screen or download. Use the full screen button for a distraction-free view, or download a copy. Close the page when you are finished and nothing is kept.

How Drop and Open displays JS files

Drop and Open displays JavaScript as text. It is never executed, evaluated or loaded as a script, so you can safely read code from an unknown source.

Good to know: There is no syntax highlighting or formatting. Minified scripts need a beautifier to be readable.

What JS files are used for

  • Reviewing scripts before running
  • Reading bundles and snippets
  • Sharing code with teammates
  • Auditing third-party code

Tips for working with JS files

  • Look for eval, document.write and obfuscated strings in unknown scripts.
  • Check network calls such as fetch and XMLHttpRequest.
  • Use a source map to read minified production code.

Is it private to open a JS file here?

Yes. Drop and Open runs entirely in your browser. When you choose a file, the browser reads it into local memory and displays it. There is no upload, no account, and no server-side copy. You can check this by opening your browser's developer tools, watching the Network tab and dropping a file. Learn more in our guide to client-side and server-side viewers.

JS viewer questions

Is it safe to preview a JS file?
Yes. It is shown as text and not run.
What is a .mjs or .cjs file?
Module and CommonJS variants of JavaScript, used by Node.js.
How do I run a JS file?
Use Node.js on your computer or load it in a web page. This viewer does not run code.
Is it uploaded?
No.