P2P File Transfer

A secure peer-to-peer file transfer web application.



A web-based p2p-file-transfer application that does not require registration. Simply exchange a 6-digit token number and start to transfer files between two or more peers. This web application uses WebSocket technology to connect you with the other peers, and when handshaking is over, each peer connects directly to the other peers using WebRTC protocol. The communication over WebSocket is encrypted using the provided password to make sure no one can access your signaling data.


This application provides an easy-to-use file transfer interface between two or more peers. It uses the WebSocket technology for the initial handshake operations and WebRTC for the rest of the connections including file transfer. WebSocket connections are encrypted and WebRTC file transfer operation is secure. Please reads below to get more info about this web application.

As mentioned above, this web application uses a custom WebSocket server only to introduce peers to each other and send encrypted communication data that is needed to perform a persistent connection between peers with the WebRTC technology. The entire file transfer operation occurs between peers only, and there is no third-party server involved in the communication. The server code for this application can be found at p2p-file-transfer GitHub repo.

For using the app, a 6-digit token number must be exchanged between two or more peers. For example, if you want to be the file sender, please press the SENDER button within the app interface and then give the rendered 6-digit number to your peer(s). Alternatively, you can ask the peer to scan the QR Code on the screen and open the URL on a different machine. Once you exchanged the token number, the receiver party must press the RECEIVER button within the app interface and then add the 6-digit code in the designated area. Next, please press the JOIN button on the receiver side and wait for the app to initiate the connection between these two peers. Now, the app is ready to transfer files between peers. Simply drag and drop or browse a file within the app interface and wait for the transfer operation to complete. The file will be downloaded automatically to the receiver machine (default download location) once the transfer is completed. You can change this behavior within the sidebar settings pane. Moreover, there is also an option to change the server address and token to a desired one.

After a few minutes, the application automatically disconnects itself from the signaling (WebSocket) server and only the WebRTC connection between peers remains active. Reloading the app will initiate the signaling connections. Using this web application you can add as many peers as you want for the file transfer operation. One peer is the sender and all others are file receivers. Only the sender token needs to be exchanged between peers. The only limitation is your internet bandwidth. Please note that, for WebSocket communication, this web application uses a server in the replit.com app hosting website. For WebRTC, the app uses three public stun servers: stun.mit.de, stun.l.google.com, and stun.services.mozilla.com.

Related Blog Posts

  1. How to Use Multiple Browser Profiles in Any Browser: Web browsers store all types of personal data. It could be extensions, settings, history, bookmarks, credit card information, personal emails and more in a profile. Separate profiles can be created to split things up to enhance privacy and management...
  2. How does HTTPS actually work : When it comes to your standard HTTP protocol, HTTPS is covered by a generous amount of scrumptious SSL/ TLS encryption. It prevents anyone from modifying or viewing requests which make up the browsing experience. HTTPS stores the credit card details, communications...
Comments and feedback