Bencode Decoder and .torrent Viewer

Parses bencoded data into a readable tree and summarises torrent files, including the info hash and magnet link.

Use the tool

Why this tool exists

Bencode is the format of .torrent files and some tracker replies. It has integers, byte strings, lists and dictionaries and is hard to read by eye.

The tool decodes pasted text or a file, shows strings as text when they are valid UTF-8 and as hex otherwise, and replaces the long pieces field by a count. For torrents it also lists the files and computes the SHA-1 info hash from the info dictionary exactly as stored.

How to use it

  1. Paste bencode text, or choose a .torrent file.
  2. Read the summary at the top for torrents.
  3. Scroll the tree for all fields.
  4. Copy the magnet link if you need it.

Frequently asked questions

Is the info hash correct?

It is the SHA-1 of the stored info bytes, which is how version 1 torrents are identified.

Does it download anything?

No. It only reads the file you give it.

Why do I see hex for some strings?

They are binary, such as hashes.

Is my input sent anywhere?

No. Everything runs in your browser and nothing is uploaded.