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
How to Use
Examples
The sample converts to a dictionary "catalog" containing a list of two "product" dictionaries.
Benefits
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.
More XML Tools
View AllConvert Base64 to XML
Free Base64 to XML decoder that accepts raw, wrapped or data-URL Base6...
URL-encode XML
Free URL encoder for XML that percent-encodes your document for query ...
Change XML Syntax
Replace angle braces and quotes in XML with other characters — square ...
Convert TOML to XML
Parse a TOML configuration file and rebuild it as a valid, pretty-prin...
Convert TSV to XML
Free TSV to XML converter that builds valid XML from tab-separated row...