Convert MAGNET to TORRENT
Convert a magnet URI into a local .torrent file with qBittorrent or aria2.
How to convert magnet to torrent file
- Internet
- Rating: 3.0/5
Some download clients, archival systems, and sharing workflows require a .torrent metainfo file instead of a magnet URI. Converting the link retrieves that metadata; it does not convert or download the files described by the torrent.
What the MAGNET format is
A magnet link is a text URI rather than a conventional file format. It usually contains a BitTorrent info hash in an xt=urn:btih: or xt=urn:btmh: parameter, and may also include tracker URLs, a display name, or peer hints.
BitTorrent clients such as qBittorrent, Transmission, Deluge, and aria2 use the link to locate peers or trackers and retrieve the torrent metadata. Magnet links are commonly copied from torrent indexes, download pages, forums, or another application.
What the TORRENT format is
A .torrent file is a bencoded metainfo file. It describes the files or folders, sizes, piece length, and piece hashes; BitTorrent v1 uses SHA-1 piece hashes, while BitTorrent v2 uses SHA-256 hashes and hybrid torrents can contain both. It may also include tracker, web-seed, comment, and private-torrent fields.
The file contains no shared content. Its advantages are local metadata storage, compatibility with software that cannot open magnet links, and the ability to archive one specific torrent definition.
How to convert a magnet link
Using qBittorrent
- Install qBittorrent from the official qBittorrent website and open it.
- Choose File → Add Torrent Link, paste the complete magnet URI, and confirm. Preserve the entire link, including tracker parameters and URL-encoded characters.
- Wait while qBittorrent retrieves the metadata through reachable trackers or the distributed hash table. The torrent's file list must appear before export is possible.
- Right-click the torrent and choose Export .torrent or the equivalent export command in your installed qBittorrent version.
- Choose a destination and save the resulting
.torrentfile. The original data does not need to be downloaded.
Keep tracker and DHT access enabled for ordinary public torrents. A private torrent must use the tracker specified by its metadata; do not enable DHT or peer exchange for it unless the owner explicitly permits those methods.
Using aria2
aria2 can retrieve metadata without downloading the payload:
aria2c --bt-metadata-only=true --bt-save-metadata=true --dir=/path/to/output "magnet:?xt=urn:btih:..."
Replace the URI and output directory with the actual values. aria2 normally saves the retrieved metainfo using the torrent name and a .torrent extension. On Windows, quote the URI and use a valid path such as C:\Users\Name\Downloads.
Using an online service
Web services such as Magnet2Torrent can retrieve metadata for a public magnet and return a .torrent file, but service availability, retention policies, and supported torrent types can change. Use only a public link, check the service's HTTPS connection and deletion policy, and compare the returned file's info hash with the magnet when possible. Do not submit private, access-controlled, or otherwise sensitive magnet links to a third party; qBittorrent or aria2 keeps the link and metadata local.
Compatibility and limitations
A magnet link cannot normally be converted offline from its hash alone. The client must reach a peer, tracker, or other metadata source. Conversion can fail when the hash is invalid, the swarm is inactive, required trackers are unreachable, or a private torrent's tracker cannot be contacted.
The exported file represents the metadata retrieved from the swarm. It should have the same info hash as the magnet if the metadata is unchanged, although tracker lists, web-seed entries, comments, and other non-info fields can differ. Different clients may also export v1, v2, or hybrid metadata differently.
If you have only the downloaded files and no working magnet or original metainfo, use qBittorrent's Tools → Torrent Creator to create a new torrent. That file is not a conversion and will have a different info hash.
Converting metainfo does not grant permission to access, copy, or distribute the underlying content.
MAGNET vs TORRENT: format comparison
How the MAGNET and TORRENT formats compare on the properties that matter most for this conversion.
| Property | .MAGNET Magnet URI | .TORRENT BitTorrent metainfo file |
|---|---|---|
| Opens in a web browser | Partial | No |
| Plain-text readable | Yes | Yes |
| Text formatting | None | None |
| Images | No | No |
| Interactive elements | No | No |
| Further editing | Not directly editable | Limited |
| Typical file size | Very small | Very small |
| Open standard | Partly open | Partly open |
| Introduced | 2002 | 2001 |
| Developer | Internet Engineering Task Force / magnet URI scheme community | BitTorrent, Inc. / Bram Cohen (original protocol and metainfo format) |
| MIME type | application/x-magnet | application/x-bittorrent |