Skip to content
kitty/binDev
Your files stay on this device

XML to JSON without the mess

Paste XML and get JSON where attributes start with @, text sits under #text and repeated tags become lists. It converts back the same way.


        

How values carry across

JSON, YAML and TOML all have objects, lists, strings, numbers and true/false, so those convert cleanly. TOML has no null, so empty values are left out and you're told. Dates in YAML and TOML are kept as text in ISO format, so 2026-10-21 stays exactly as written.

XML and .env

XML attributes become keys starting with @, text next to child elements goes under #text, and repeated elements become a list. Going back to XML follows the same rules. A .env file is a flat list of names and values, so nested data is flattened into names like DATABASE_HOST, and lists are joined with commas. Quoted values, export lines, inline comments and multi-line values in double quotes are understood.

Error messages that help

Every parser reports the line and column where it got stuck, such as a missing comma in JSON, a tab or a bad indent in YAML, a duplicate key in TOML or a tag that doesn't close in XML. Press Show the line to jump straight to it.

more in the bin

Keep going.

More in kittybin Dev

Explore the bin