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 AllFilter an XML File
Filter XML keys and values that match a pattern — keep only matching e...
Convert JSON to XML
Free JSON to XML converter that builds valid, prettified XML from JSON...
Convert XML to TSV
Free XML to TSV converter that flattens repeated XML elements into a t...
Visualize XML
Turn any XML document into a clean, colorful tree diagram image (SVG)....
Convert BSON to XML
Decode a base64 BSON (Binary JSON / MongoDB) string back into a readab...