XML to C Sharp POJO Generator
Paste XML sample and generate Newtonsoft.Json C# POCO classes with JsonProperty mappings in your browser.
Generate strongly typed C# POCO shells from descriptive XML payloads using the same ergonomic pattern as Newtonsoft.Json attributes. Paste a trimmed sample fragment, tweak the preferred root class identifier, then copy-ready code appears beside your editor.
Perfect for rapid prototyping pipelines
- WSDL payloads: Strip SOAP envelopes and derive nested classes reflecting complex elements quickly.
- Messaging bridges: Compare generated models against XSD expectations before tightening validation.
- Teaching: Show how flattened XML dictionaries map cleanly to property bags without manual scaffolding.
- Contract-first spikes: Pair with manual XmlSerializer decorators after the automated baseline lands.
Attributes use [JsonProperty("name")] so renaming property identifiers to PascalCase does not silently break payloads when later serializing analogous JSON envelopes.
How attributes & text nodes reconcile
fast-xml-parser attaches attribute keys with an @_ prefix internally. Generated [JsonProperty] names strip those prefixes automatically. Implicit text nodes keyed as #text become a property named Text while serialization metadata still references #text.
Known limitations
Highly polymorphic XSD unions, mixed content narratives, CDATA quirks, or XML Schema choices may require decorator edits after automation. Repeated sibling shapes infer List<T> according to first observed item only.
Frequently Asked Questions
Which serializer does the output assume?
Newtonsoft.Json namespaces are emitted for interoperability with workloads already using Json.NET. Adapt attributes if you migrate to source-generated System.Text.Json contracts.
Why do repeated tags sometimes merge?
The parser merges duplicate siblings identical in structure into arrays. Divergent schemas need manual branching.
Can namespaces be preserved verbatim?
Colon-prefixed element names propagate into property names minus invalid characters—verify namespace collisions independently.
Does the tool send XML to servers?
No. Parsing happens inside your browser so confidential XML never leaves your session.
Related tools
Your recent visits