Skip to content

Magnet Utilities

Tools and knowledge for working with magnet links and info hashes directly.

A magnet URI looks like this:

magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Example+File&tr=udp%3A%2F%2Ftracker.example.com%3A1337
ParameterMeaning
xt=urn:btih:Exact topic — the info hash (SHA-1 or SHA-256)
dn=Display name — suggested filename (optional, not trusted)
tr=Tracker URL — one per tr= parameter (optional, DHT works without)
xl=Exact length — total size in bytes (optional)
as=Acceptable source — fallback HTTP URL for the file (optional)

The only required part is xt=urn:btih: — everything else is optional. A bare magnet link with just the info hash will still work if the torrent is in the DHT network.

Info Hash Formats

Older torrents use SHA-1 info hashes (40 hex characters):

08ada5a7a6183aae1e09d831df6748d566095a10

Newer torrents (BitTorrent v2) use SHA-256 (64 hex characters):

631a31dd0a46257d5078c0dee4e4e847cc55f9e3c1e8b6890d3b37c2e8cf0d78

Both appear in magnet links under xt=urn:btih: (v1) or xt=urn:btmh: (v2).

Command-Line Tools

webtorrent-cli

Fetches torrent metadata and can stream video directly:

bash
npm install -g webtorrent-cli

# Get info about a magnet link
webtorrent magnet:?xt=urn:btih:... --no-connection

# Stream a torrent to VLC
webtorrent magnet:?xt=urn:btih:... --vlc

aria2

A fast, lightweight download utility with BitTorrent support:

bash
# Download a magnet link
aria2c "magnet:?xt=urn:btih:..."

transmission-cli

Transmission's CLI client handles magnet links directly:

bash
transmission-cli "magnet:?xt=urn:btih:..."

Searching by Info Hash

If you have an info hash and want to find active torrents for it, you can:

  1. Paste the hash directly into Magnetz search
  2. Construct a magnet link: magnet:?xt=urn:btih:YOURHASH and open it — DHT will find peers
  3. Search on public tracker sites using the hash

Adding Extra Trackers

Adding more tracker URLs to a magnet link can improve peer discovery, especially for older or less-popular torrents:

magnet:?xt=urn:btih:HASH&tr=udp://tracker.opentrackr.org:1337/announce&tr=udp://open.tracker.cl:1337/announce

A maintained list of active public trackers: github.com/ngosang/trackerslist

Most modern torrent clients also let you add trackers to an existing torrent after it's been added — right-click → Edit Trackers (qBittorrent) or Properties → Trackers (Deluge).

Part of Magnetz — the fast magnet search engine.