See also

  1. .torrent maker

Torrent file information

Miscellaneous

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

Max size of the input data is 10 MiB.

clear
clear
clear

Wrappers are executed in sequence on shared data string. For example, to supply base64-encoded stream of GZIP-compressed data enter wrappers: base64, gzip and fill the data input with the base64 stream. 

If data is not entered information from other tabs (upload, by URL and direct) is used to replace data on this page. This lets you enter gzip as a wrapper here and upload a file using upload tab while leaving data on this page empty. 

Currently supported wrappers are: base64, bzip, cslashes, datauri, direct, ftp, ftps, gzip, hex2bin, http, https, qprintable, upload, url, urlencoding, zlib

  • Upload
  • By URL
  • Direct input
  • Custom
Ctrl+Shift+E ↔
Torrent file information
  1. 1. Torrent file format
  2. 2. Torrent structure
    1. 2.1. Infohash algorithm
  3. 3. Reference pages

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). 

Torrent file format 

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»

Integers
are encoded in torrent files as i52e (number 52);
Strings
are stored as 10:bittorrent (length + colon + the string itself) in torrent files;
Lists
are simply recursively encoded values so it's like li123e4:worde that represents 2 items: a number 123 and a string «word»;
Dicrionaries
are similar to lists except they start with letter d and have a bencoded string before each value. Both lists and dictionaries can be nested; dictionaries must be sorted by keys.

Torrent structure 

Given above info torrent files are dictionaries (hashes) of the following values: 

info
A dictionary with torrent contents (files and hashes);
announce
URL of the primary tracker;
announce-list
Is optional; if present defines a list of alternative announce URLs (bittorrent trackers);
creation date
Optional field with a timestamp;
comment
Optional, a string;
created by
Optional credits of the program used to create this .torrent file (such as uTorrent, BitComet or Azureus);
encoding
Optional encoding algorithm used to generate pieces of the info dictionary.

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. 

Infohash algorithm 

A torrent infohash is a 40-character SHA-1 checksum of the bencoded info dictionary. In PHP you can get it as: 

PHP
echo sha1(bencode($torrent['info']));

Or, if you're using the BEncoded PHP class you only need this: 

PHP
$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. 

Reference pages