Convert JSON to Go structs

Turn a JSON sample into Go structs complete with `json:` field tags. Field names are converted to exported Go identifiers, types are inferred (int64, float64, bool, string, slices, and nested structs), and everything is ready to paste into your package.

The whole conversion happens client-side — no upload, no queue, no account — so you can safely turn an API payload into a typed Go struct in seconds.

Need a different language? See all JSON-to-code converters.

Other languages

JSON to Go Struct Converter — frequently asked questions

How do I convert JSON to a Go struct?
Paste your JSON on the left and the Go structs appear on the right with the correct field types and json tags. Copy them straight into your Go file.
Does it add json tags and export fields?
Yes. Each field gets a `json:"..."` tag matching the original key, and field names are converted to exported (capitalized) Go identifiers, so the structs marshal and unmarshal correctly.
Is my JSON uploaded anywhere?
No. Parsing and code generation run entirely in your browser with JavaScript — your JSON never leaves your device, so it's safe to paste API responses and other sensitive payloads. It's free with no sign-up; a single unobtrusive ad slot covers hosting.

Spotted a bug or have a suggestion?

Found something broken, have an idea, or just want to say thanks about any of our tools? Every message reaches a real person.