Bencode / .torrent Inspector
File
Bencode is the simple text-binary format BitTorrent uses to store metadata. There are only four types — integers (`i42e`), byte strings (`4:spam`), lists (`l…e`), and dictionaries (`d…e`) — yet a single .torrent file packs the entire torrent: announce trackers, comment, creation date, the file or files being shared, piece length, and the long SHA-1 piece hash string. This tool reads any bencoded file entirely in your browser, parses it into an expandable tree, and if it recognizes a torrent structure also computes the BitTorrent info hash (SHA-1 of the bencoded `info` dictionary's exact byte range) — the same 40-hex-character identifier that appears in magnet links as `xt=urn:btih:…`. Single-file and multi-file torrents are both handled, with per-file paths and sizes shown when present. Nothing is downloaded, seeded, or sent anywhere — the file is only read into memory to be inspected.
How to use
- Drop or pick any .torrent file (or any bencoded blob).
- Read the recognized torrent summary at the top: name, total size, piece length, piece count, trackers, info hash.
- Click the copy button next to the info hash to grab it for use in a magnet link (`magnet:?xt=urn:btih:<hash>`).
- Expand the raw tree below to see every bencoded key, including unrecognized extensions.
- Re-drop another file at any time — the inspector replaces the previous result.
Frequently asked questions
- How is the info hash computed?
- We record the exact byte range of the `info` dictionary's value as the bencode parser walks the file, then compute SHA-1 over those raw bytes. This is the BitTorrent v1 info hash and matches the `xt=urn:btih:` parameter in magnet links. BitTorrent v2 uses SHA-256 of a different canonicalization — that's not computed here (most public torrents are still v1).
- Why are some string values shown as `<bin … hex …>`?
- Bencode strings are byte strings — they don't have to be UTF-8. The `pieces` field, for example, is a concatenation of binary SHA-1 hashes, one per piece, and would render as line noise if shown as text. Values that fail strict UTF-8 decoding are shown as a length + first-8-bytes hex preview instead. The byte length is always accurate.
- Does this tool download or seed the torrent?
- No. Despite the name, a .torrent file is just metadata — it doesn't contain any of the actual content. This tool only parses the metadata locally in your browser to display structure and identifiers. No network requests are made to trackers, peers, or the BitTorrent DHT.
- Can I inspect non-torrent bencoded files?
- Yes. Some BitTorrent clients and trackers exchange bencoded blobs that aren't .torrent files — DHT routing tables, scrape responses, fast-resume files, etc. As long as the top of the file is valid bencode, the tree view will render it; the torrent-summary section above just won't appear unless there's an `info` dict at the top level.
Related tools
Image → PDF Converter
Combine multiple JPG / PNG images into a single PDF with adjustable page size, orientation, and fit.
ZIP Inspector
Drop a ZIP and see every file inside — sizes, contents, and per-file download — without unpacking it locally.
File Splitter
Split a large file into smaller chunks to bypass attachment or upload size limits.
Text Encoding Converter
Open text files in legacy encodings (EUC-KR, Shift_JIS, Windows-1252…) as readable UTF-8.
File Hash (Checksum)
Compute SHA-1, SHA-256, and SHA-512 checksums of any file.
CSV ↔ JSON Converter
Convert CSV to JSON and JSON back to CSV, with a delimiter option.