WebTorrent is a streaming torrent client for the web browser and the desktop. WebTorrent is written completely in JavaScript – the language of the web – and uses WebRTC for peer-to-peer transport whenever possible. BitTorrent Web is an easy-to-use online torrent client that uses your default browser. If you already know where to find your torrent file, you can click on it or drag the torrent into the browser window of BitTorrent Web. Alternatively, you can use the search box at the top of the BitTorrent Web window to search for a torrent download.
WebTorrent is the first torrent client that works in the browser. It's easyto get started!
Install
To start using WebTorrent, simply include thewebtorrent.min.js
script on your page.
This provides a WebTorrent
function on the window
object.
Browserify
WebTorrent also works great with browserify, which letsyou use node.js style require()
to organize your browsercode, and load packages installed by npm.
Then use WebTorrent
like this:
Quick Examples
Downloading a torrent (in the browser)
This supports video, audio, images, PDFs, Markdown, and more, rightout of the box. There are additional ways to access file content directly, includingas a node-style stream, Buffer, or Blob URL.
Video and audio content can be streamed, i.e. playback will start before the fullfile is downloaded. Seeking works too – WebTorrent dynamically fetchesthe needed torrent pieces from the network on-demand.
Note: downloading a torrent automatically seeds it, allowing the user to also serve the file to other peers
Creating a new torrent and seed it (in the browser)
This example uses the drag-drop
package, to make the HTML5 Drag andDrop API easier to work with.
Note: If you do not use browserify, use the standalone filedragdrop.min.js
.This exports a DragDrop
function on window
.
Download and save a torrent (in Node.js)
Creating a new torrent and seed it (in Node.js)
Note: Seeding a torrent to be compatible with the browser (i.e. with support for WebRTC) requires webtorrent-hybrid (note this requires Node version 12, 13 to work, Node v14 will NOT work with this module, lower node versions may also be supported)
where seedy.txt is a text file which is going to be seeded as a torrent, such as
Complete HTML page example
Looking for a more complete example? Look no further! This HTML example has a form inputwhere the user can paste a magnet link and start a download over WebTorrent.
Best of all, it's a single HTML page, under 70 lines!
If the torrent contains images, videos, audio, or other playable files (with supportedcodecs), they will be added to the DOM and streamed, even before the full content isdownloaded.
HTML example with status showing UI
This complete HTML example mimics the UI of thewebtorrent.io homepage. It downloads thesintel.torrent file, streams it inthe browser and outputs some statistics to the user (peers, progress, remainingtime, speed...).
You can try it right now on CodePen tosee what it looks like and play around with it!
Online Torrent Client Reddit
Feel free to replace torrentId
with other torrent files, or magnet links, butkeep in mind that the browser can only download torrents that are seeded byWebRTC peers (web peers). Use WebTorrent Desktopor Instant.io to seed torrents to the WebTorrent network.
Web Torrent Downloader Online
More Documentation
Online Torrent Client Downloader Free
Check out the API Documentation and FAQ for more details.