JSON to Go, Python, Java, C# Classes

Generate Go structs, Python dataclasses, Java, C#, Rust, Kotlin or PHP classes from a JSON sample.

Runs instantly in your browser — results update as you type.

How do I generate classes from JSON?

Paste a JSON object and choose the language. The tool infers each field’s type (string, integer, float, boolean, list or nested object), creates a separate type for every nested object and adds the right annotations — json tags for Go, @JsonProperty for Java, JsonPropertyName for C#, serde for Rust.

Tips

  • Use a sample that includes every optional field, with realistic values.
  • null values become a generic type (interface{}, Any, Object) — refine them by hand.
  • For TypeScript interfaces, use JSON to TypeScript.

Frequently asked questions

Does it handle arrays of objects?

Yes, the keys of all array items are merged into one type.

Are field names converted?

Yes, to each language’s convention, with annotations mapping back to the JSON keys.

Is my JSON uploaded?

No.