Cosmovex Tools

Need to write JavaScript together? Share a live editor that runs code for everyone

JavaScript with PairPad

The pad opens with a small JavaScript exercise and its tests in main.js, ready to run. Press Run to see the console, then Share to turn the pad into a room at its own link: whoever opens it edits the same file with you and sees the same output.

  1. Press Run or Ctrl/Cmd+Enter. main.js runs in a sandboxed frame and the console pane shows the table and three checks, one of them failing on purpose.
  2. Press Share. The pad becomes a room at a new URL and the files you see are carried into it.
  3. Send the link. Whoever opens it joins with a name and colour; you see their cursor and selection as they type, and edits on the same line merge without overwriting.
  4. Fix the TODO together and press Run again. Output is written into the room, labelled with who ran it, so everyone reads the same result.
  5. Add a second file with the + tab, for another exercise or an index.html with a live preview; a free room keeps 2 files. Each JavaScript file runs on its own when it is the open tab. Pro adds unlimited files and a .zip download.
collaborative javascript editor share javascript code online liveonline javascript editor with consolepair programming javascript onlinejavascript coding interview padreal time js editor share link
Open PairPad Free · Pro $29 one-time · no account

What to know

Screen sharing makes one person type while the other watches. A shared editor lets both of you type, point at a line by selecting it, and try an idea without asking for control. PairPad merges edits with a CRDT (Yjs), which means two people changing the same function at the same moment both keep their changes rather than one overwriting the other, and nobody needs to save or pull.

Running JavaScript is part of the session, not a separate step. Code runs in a sandboxed iframe in the browser of whoever pressed Run, with no access to this page, its storage or your cookies, and the console output goes into the room. console.log, console.table, console.error and uncaught exceptions are shown with the file and line. A loop that never ends is stopped after five seconds without freezing anyone's tab, which matters when someone is experimenting live.

The runner is a browser worker, not Node.js. fetch, URL, crypto.randomUUID, structuredClone, Intl, timers and top-level await work; require, import from another file, fs, process and npm packages do not, and there is no DOM in the console runner. For algorithm practice, interview questions, array and object manipulation and async code that is plenty. DOM experiments go in an index.html file, which renders in the Preview pane and can load the room's .js and .css files. TypeScript files are stripped of types and run the same way, so you can switch main.js to main.ts by renaming it.

For interviews, open a fresh pad from this page, replace main.js with the question and send the link before the call starts. The candidate needs no account and nothing to install. A free room holds 3 people at once and is deleted 24 hours after the last activity; Pro adds rooms of up to 10 people, keystroke replay, private interviewer notes, a question bank and rooms that never expire.

Updated · Cosmovex

Questions

Can everyone in the room run the JavaScript?

Yes. Anyone can press Run; the code executes in their own browser's sandbox and the console output is written into the room so everyone sees the same lines, with the name of whoever ran it and how long it took.

Can I use npm packages or Node.js APIs?

No. The code runs in a browser sandbox, so browser APIs such as fetch, crypto and Intl work, but require, imports between files, fs, process and npm installs do not. Paste small helper functions into the file you are running instead.

Do people need an account to join?

No. Opening the link is enough. Each person picks a display name, which is shown next to their cursor and in the run history.

What happens to an infinite loop?

The run is stopped after five seconds and the console shows that it timed out. The sandbox runs separately from the page, so the editor stays responsive for everyone.

Is my code private?

Before you press Share, nothing leaves your browser. After Share, the room text and shared output are stored so the people with the link can join; anyone with the link can read and edit it, and free rooms are deleted 24 hours after the last activity.

The free plan covers everything on this page. PairPad Pro ($29, paid once) is described on the PairPad page.