All Tools
Categories
XML Tools 64 Email Marketing Tools 55 Import-Export Tools 50 Text Tools 12 JSON Tools 10 Shipping Freight Tools 5 Calculator 4 Marketing Tools 3
About Contact Privacy

Convert XML to Bencode

Convert an XML document into the Bencode encoding used by BitTorrent. Dictionaries, lists, integers and strings map 1:1 from the XML tree.

Input
Output

About Convert XML to Bencode

Convert XML to Bencode serializes an XML document into the Bencode encoding used by BitTorrent metadata. Element names become dictionary keys, repeated elements become lists, numeric text becomes integers and everything else becomes strings.

Features

  • Full Bencode dictionaries, lists, integers and strings
  • Attributes mapped with a configurable prefix
  • Deterministic output (keys sorted)
  • UTF-8 string lengths computed correctly
  • Paste a bencoded result straight into a torrent tool
  • How to Use

  • Paste an XML document.
  • Choose how attributes and numbers are treated.
  • Copy the bencoded string — it stays valid Bencode.
  • Examples

    The sample converts to a dictionary "catalog" containing a list of two "product" dictionaries.

    Benefits

  • Bridge XML data to BitTorrent metadata
  • Understand bencode by example
  • Deterministic, spec-compliant output
  • Frequently Asked Questions

    Is my XML sent to a server?
    No. Everything runs locally in your browser. Your data is never uploaded, stored or logged.
    Can I download the result?
    Yes — use the Download button below the output area, or Print / Save PDF for a printable copy.