{
  "slug": "magnet-link-parser",
  "name": "gizza-ai/magnet-link-parser",
  "version": "0.1.0",
  "title": "Magnet Link Parser & Builder — decode magnet: URIs — gizza.ai",
  "description": "Parse a BitTorrent magnet link into info-hash, display name, trackers, and web seeds — or build one from parts. Runs in your browser, nothing uploaded.",
  "tags": [
    "magnet link parser",
    "magnet uri",
    "parse magnet link",
    "bittorrent magnet",
    "info hash",
    "btih",
    "magnet link builder",
    "torrent magnet decoder"
  ],
  "category": "network",
  "urls": {
    "page": "https://gizza.ai/tools/magnet-link-parser/",
    "markdown": "https://gizza.ai/tools/magnet-link-parser/index.md",
    "descriptor": "https://gizza.ai/tools/magnet-link-parser/tool.json",
    "deep_link_example": "https://gizza.ai/tools/magnet-link-parser/?mode=parse&magnet=magnet%3A%3Fxt%3Durn%3Abtih%3Ac12fe1c06bba254a9dc9f519b335aa7c1367a88a%26dn%3Dexample&info_hash=40%20hex%20chars%2C%2032%20base32%20chars%2C%20or%20urn%3Abtih%3A%E2%80%A6&display_name=My%20File&trackers=udp%3A%2F%2Ftracker.example.com%3A1337%0Ahttp%3A%2F%2Ftrack2.org%2Fannounce&web_seeds=https%3A%2F%2Fseed.example%2Ffile&exact_length=123456"
  },
  "cli": "gizza tool magnet-link-parser 'mode=parse'",
  "tool": {
    "description": "Parse a BitTorrent magnet: link into its structured parts (info-hash, display name, trackers, web seeds, sources, keywords, length), or build a magnet: link from parts. parse mode reads magnet; build mode reads info_hash plus optional fields.",
    "parameters": {
      "additionalProperties": false,
      "properties": {
        "display_name": {
          "description": "Build mode: the display name (dn). Optional.",
          "type": "string"
        },
        "exact_length": {
          "description": "Build mode: exact total length in bytes (xl). Optional.",
          "type": "integer"
        },
        "info_hash": {
          "description": "Build mode: the v1 info-hash — 40 hex chars, 32 base32 chars, or a urn:btih:<hash>. Required to build.",
          "type": "string"
        },
        "magnet": {
          "description": "Parse mode: the magnet: URI to decode. A bare query string is also accepted.",
          "type": "string"
        },
        "mode": {
          "default": "parse",
          "description": "Direction: 'parse' (default) decodes a magnet: link; 'build' assembles one from parts.",
          "enum": [
            "parse",
            "build"
          ],
          "type": "string"
        },
        "trackers": {
          "description": "Build mode: tracker URLs (tr), newline- or comma-separated. Optional.",
          "type": "string"
        },
        "web_seeds": {
          "description": "Build mode: web-seed URLs (ws), newline- or comma-separated. Optional.",
          "type": "string"
        }
      },
      "type": "object"
    }
  }
}