Report Tool or Give Us Suggestions

YAML to C Sharp POJO Generator

Parse YAML and generate C# property classes with Newtonsoft.Json attributes in your browser.

L ading . . .

YAML to C# POJO Generator

This generator reads YAML configuration or sample documents and emits C# classes with Newtonsoft.Json.JsonProperty attributes so property names match the original YAML keys. Lists and nested objects become List<T> and nested types automatically.

How classes are inferred

Scalar strings map to string, integers to int, floating values to double, and booleans to bool. Empty arrays map to List<object>. Objects receive unique PascalCase class names derived from their path in the document.

Integration tips

Add the Newtonsoft.Json NuGet package in your .NET project, paste the generated models into a file, and adjust namespaces or nullable reference settings to match your coding standards.

Frequently Asked Questions

Does it support YAML anchors and aliases?

js-yaml resolves anchors while loading. The emitted C# reflects the merged graph after resolution.

Can I rename the root class?

Yes. Use the Root class name field before copying output. The generator uses that hint for the outermost type name when possible.

What about duplicate nested shapes?

Distinct paths receive distinct class names. If two branches need the same hand-tuned model, merge them manually after export.

Is YAML uploaded anywhere?

No. Parsing and code generation stay in your browser session.

logo OnlineMiniTools

OnlineMiniTools.com is your ultimate destination for a wide range of web-based tools, all available for free.

Feel free to reach out with any suggestions or improvements for any tool at admin@onlineminitools.com. We value your feedback and are continuously striving to enhance the tool's functionality.

© 2026 OnlineMiniTools . All rights reserved.

Hosted on Hostinger

v1.10.0