ShareTextHome →

Guide

How ShareText Works

A detailed explanation of how ShareText transfers files between devices — from pairing to encrypted transfer to completion.

The simple version: Open ShareText on both devices. Connect with a code. Send your file. It moves directly between devices, encrypted. Close the tab when done. Nothing is stored.

The Transfer Flow

1

Open ShareText on both devices

Visit sharetexts.online in a browser on each device. No app download. No account creation.

2

Create a room (Device A)

On the sending device, tap "Send something." ShareText creates a temporary room and generates a 6-digit pairing code. The room exists only for this session.

3

Join the room (Device B)

On the receiving device, tap "Receive something" and enter the 6-digit code. Alternatively, scan the QR code or open a share link. The two devices now know about each other.

4

WebRTC connection established

The browsers negotiate a direct peer-to-peer connection using WebRTC. The signaling server helps them find each other, then steps aside. All subsequent data flows directly between devices.

5

Transfer data

Type text, paste a link, or attach a file. The data is chunked into 64KB pieces, sent over the encrypted DataChannel, and reassembled on the other side. Progress is shown in real time.

6

Verify and complete

Each file is verified using SHA-256 checksum. If the checksums match, the transfer is confirmed. The receiver can save or download the received content.

7

Close the room

When you close the tab or the session expires, the room is destroyed. No files, messages, or metadata are stored on any server.

What Happens Technically

Room Creation

When you click "Send something," the frontend calls the signaling server to create a room. The server generates a unique room ID and a TOTP-based pairing code. The room has a limited lifetime and closes automatically if not used.

Pairing Code

The 6-digit pairing code is derived from a time-based one-time password (TOTP) algorithm. It rotates periodically for security. The code is displayed on Device A and entered on Device B to prove they're intended partners.

WebRTC Connection

WebRTC is a browser technology that enables direct peer-to-peer connections. Here's what happens:

  1. Offer/Answer: Device A creates a connection offer. The signaling server relays it to Device B. Device B creates an answer.
  2. ICE Candidates: Both devices discover their network addresses (local, public, and relay) and share them through the signaling server.
  3. Connection: The browsers establish a direct connection using the best available path — typically a direct peer-to-peer connection.
  4. Encryption: The connection is encrypted using DTLS (Datagram Transport Layer Security), the same protocol used by secure web browsing.

Data Transfer

Once connected, data flows through a WebRTC DataChannel:

Relay Fallback

If a direct peer-to-peer connection isn't possible (e.g., both devices are behind strict firewalls), ShareText uses a TURN relay server as a fallback. The data remains encrypted — the relay only forwards encrypted packets and cannot read the content.

Encryption Details

Protocol: DTLS-SRTP over WebRTC DataChannel

Scope: All data between devices is encrypted in transit

Key exchange: DTLS handshake during connection setup

Server visibility: The signaling server sees connection metadata but not file contents

File Integrity

Every file transfer includes a SHA-256 checksum verification. The sender computes the checksum before sending. The receiver computes it after receiving. If they match, the file arrived intact. If they don't match, ShareText flags the discrepancy.

Session Lifecycle

Limitations

Try ShareText Free →