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.
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 name | JavaScript Source File |
|---|---|
| File extension | .js |
| MIME type | text/javascript |
| Developed by | Brendan Eich at Netscape (standardised as ECMAScript) |
| Introduced | 1995 |
How to open a JS file online
- 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.
- See it instantly. Your browser reads the file locally and shows the preview in a second or two.
- 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.
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.