Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am interested in rendering a torrent file into a readable form (to see what files does it reference, what tracker information does it contain etc.). What a tool can I use to do just this?

share|improve this question
up vote 18 down vote accepted

btshowmetainfo, formerly included in the BitTorrent distribution but now largely installed with BitTornado (a fork of the BitTorrent 3.x codebase), does just that.

$ btshowmetainfo amd64cd-5.1.2.iso.torrent 
btshowmetainfo 20030621 - decode BitTorrent metainfo files

metainfo file.: amd64cd-5.1.2.iso.torrent
info hash.....: e30c05f2330ba4869eefb90bf5978a505303b235
file name.....: amd64cd-5.1.2.iso
file size.....: 253325312 (966 * 262144 + 94208)
announce url..: http://tracker.netbsd.org:6969/announce
share|improve this answer

You can use transmission-show, included in the Gnome Transmission BitTorrent client.

$ transmission-show amd64cd-5.1.2.iso.torrent
Name: amd64cd-5.1.2.iso
File: amd64cd-5.1.2.iso.torrent


  Name: amd64cd-5.1.2.iso
  Hash: e30c05f2330ba4869eefb90bf5978a505303b235
  Created by: 
  Created on: Sun Feb  5 01:31:29 2012
  Piece Count: 967
  Piece Size: 256.0 KiB
  Total Size: 253.3 MB
  Privacy: Public torrent


  Tier #1


  amd64cd-5.1.2.iso (253.3 MB)

If you're using an older version of Transmission, you can use the older transmissioncli --info command:

$ transmissioncli --info amd64cd-5.1.2.iso.torrent
Transmission 2.03 (11030) - http://www.transmissionbt.com/
hash:   e30c05f2330ba4869eefb90bf5978a505303b235
name:   amd64cd-5.1.2.iso

tracker tier #1:
        announce:       http://tracker.netbsd.org:6969/announce
size:   253325312 (966 * 262144 + 94208)
        amd64cd-5.1.2.iso (253325312)
share|improve this answer
-1 my version of transmission-cli (2.51 Debian testing amd64) does not have this option – ixtmixilix May 17 '12 at 23:48
@ixtmixilix: Answer updated to use new "transmission-show" command. – Teddy May 24 '12 at 16:54

lstor, including the ability to calculate the hash, which can be quite useful in shell scripts:

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -qo __hash__

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -q
NAME Chakra 2012.02 Archimedes x86.torrent
SIZE 1.4 GiB (1461 * 1.0 MiB + 0 bytes)
HASH B3472076574BC666396766AB3B28C0054D740B46
URL  http://linuxtracker.org:2710/********************************/announce
PRV  YES (DHT/PEX disabled)
TIME 2012-02-13 17:10:28
BY   qBittorrent v2.9.3

chakra-2012.02-Archimedes-i686.iso                                      1.4 GiB

$ lstor Chakra\ 2012.02\ Archimedes\ x86.torrent -q --raw
{'announce': 'http://linuxtracker.org:2710/********************************/announce',
 'created by': 'qBittorrent v2.9.3',
 'creation date': 1329149428,
 'info': {'length': 1531969536,
          'name': 'chakra-2012.02-Archimedes-i686.iso',
          'piece length': 1048576,
          'pieces': '<1461 piece hashes>',
          'private': 1},
 'url-list': ''}
share|improve this answer

You can use aria2:

$ aria2c -S ubuntu-14.04.2-desktop-i386.iso.torrent 
>>> Printing the contents of file 'ubuntu-14.04.2-desktop-i386.iso.torrent'...
*** BitTorrent File Information ***
Comment: Ubuntu CD releases.ubuntu.com
Creation Date: Thu, 19 Feb 2015 22:17:32 GMT
Mode: single
Info Hash: 33678ec8b0dfb8a9061348c8af7194268c0b8310
Piece Length: 512KiB
The Number of Pieces: 2006
Total Length: 0.9GiB (1,051,721,728)
Name: ubuntu-14.04.2-desktop-i386.iso
Magnet URI: magnet:?xt=urn:btih:33678EC8B0DFB8A9061348C8AF7194268C0B8310&dn=ubuntu-14.04.2-desktop-i386.iso&tr=http%3A%2F%2Ftorrent.ubuntu.com%3A6969%2Fannounce&tr=http%3A%2F%2Fipv6.torrent.ubuntu.com%3A6969%2Fannounce
   |0.9GiB (1,051,721,728)
share|improve this answer
-S, --show-files[=true|false] Print file listing of ".torrent", ".meta4" and ".metalink" file and exit. In case of ".torrent" file, additional information (infohash, piece length, etc) is also printed. – Weekend Jun 29 at 21:34

You can use Torrent File Editor Files tab Raw tab

Also .torrent file can be converted to .json format with command line --to-json.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.