Displays all information contained inside a .torrent file.
This online tool parses and shows all information contained in a .torrent file (such files are used by peer-to-peer BitTorrent networks to initiate data transfer). ¶
Output includes infohash, list of files, tracker URLs, client used to create the file and more. You can either upload a file directly or specify an URL. ¶
This tool uses freely available PHP functions to parse .torrent files (which format is known as bencoding) from this page. ¶
Updated 20 Oct 2011: fixed issue with single-file torrents and torrents containing large files (> 2 GiB). ¶
A torrent file contains semi-text, semi-binary data in so-called Bencoding format. Each item can be an integer, a string, an onordered list and a dictionary with key/value pairs (ordered by keys). Each item starts with a single letter except for strings (i, l, d for integers, lists and dictionaries correspondingly) and ends with letter «e». ¶
Given above info torrent files are dictionaries (hashes) of the following values: ¶
The info dictionary can be of two forms: ¶
You can parse the contents of torrent files via the torrent creator – owever, if you just want to check inside a torrent file it's more convenient to use the torrent file info form above. You can upload a torrent or enter its URL to parse and view its contents, details and information. ¶
A torrent infohash is a 40-character SHA-1 checksum of the bencoded info dictionary. In PHP you can get it as: ¶
echo sha1(bencode($torrent['info']));
Or, if you're using the BEncoded PHP class you only need this: ¶
$torrent = new BEncoded(file_get_contents('my.torrent'));
echo $torrent->InfoHash();
You might also be interested in our online hash generator that is able to calculate SHA-1, MD5, CRC32 and other checksums. ¶