100% client-side · nothing leaves your browser

Turn XML
into typed code

Paste an XML document. Get typed classes, real parsing code using each language's actual XML API, or the values baked in as literals.

interfaces, structs, and classes generated from your XML's elements and attributes
input.xml
output.ts

    
11 type targets

Attributes, text, and elements are different things

Unlike JSON, an XML element can carry attributes and text content and child elements all at once — <price currency="USD">19.99</price> has an attribute and a value simultaneously. This tool marks attributes with an Attr suffix and text content as text in generated type names, so they don't collide with child elements that happen to share a name.

Real APIs, not string matching

Parsing Code mode uses each language's actual XML handling — ElementTree in Python, DOMParser in JavaScript, System.Xml.Linq in C#, SimpleXML in PHP, REXML in Ruby. Go is the one exception worth knowing about: encoding/xml wants a struct with xml:"..." tags declared up front rather than dynamic navigation, so that's what gets generated — it's the idiomatic way to do it in Go, and missing elements safely become zero values rather than erroring.