P2P Code Share
Edit code together in real time over an encrypted peer-to-peer link. Runs JavaScript in a sandbox.
Run executes JavaScript in an isolated sandbox in your browser: it can't read this site's data, and it stops after 5 seconds. Only you see the output unless you share it.
Click Run to see console output here.
P2P Code Share FAQ
How do I share code live with someone?
Click Start session, then send the link (or let them scan the QR code). When they open it, you are connected and both of you can type in the same editor. Keep both tabs open until you are done.
Is my code uploaded to a server?
No. Code, output and video go directly between the two browsers over an encrypted peer-to-peer (WebRTC) connection. The public PeerJS server only introduces the two browsers, and a relay server may forward the encrypted data if a direct path fails.
Can the other person see my IP address?
Yes. Peer-to-peer connections work by exchanging network addresses, so each side can see the other's IP address. Only share the link with people you trust.
Is it safe to run code the other person wrote?
JavaScript runs in a sandboxed worker with a separate, empty origin: it can't read your cookies, saved data or this page, and it is stopped after 5 seconds. It can still use your processor and make network requests like any web page, so run only code you understand. Your output is shared only when you click Share output.
Why can't we connect on our office or college Wi-Fi?
Many managed networks block the traffic that peer-to-peer connections need. Try again with one or both devices on mobile data or a home network. The tool tells you when the connection server can't be reached or the direct connection fails.
Can more than two people join?
No. A session is for two people. Anyone else who opens the link is told the session is full.