JSON to Go
Paste a JSON sample and get idiomatic Go structs back — exported fields with json tags, nested structs, merged array elements and int64/float64 typing. It all runs in your browser.
Go structs appear here.
Runs in your browser. Your input is not uploaded to PayloadIQ.
JSON to Go turns a JSON sample into idiomatic Go structs you can paste straight into a package. Each field is exported in PascalCase and carries a json:"originalKey" tag, so encoding/json marshals back to exactly the keys in your payload. Nested objects become their own structs, arrays of objects are merged into one []Item struct, and Go's numeric types (int64, float64) are inferred. Everything runs locally in your browser, so a real API response never leaves your machine.
Exported fields, real json tags
Go only marshals exported (capitalized) fields, so every field is PascalCased — and because the original key is kept in the struct tag, round-tripping is lossless even for keys like is_active or user-idthat aren't valid Go identifiers. You can rename the top-level struct with the Root-name field.
Inference is sample-driven
The generator can only see what you give it, so paste the richest payload you have — for lists of objects it merges the keys across elements so a field present in only some of them still appears. Want types in another language (TypeScript, Zod, Python, Rust) or a full typed client and schema report from the same payload? Open it in the PayloadIQ playground.