Skip to content

JSON to Go Struct

Convert JSON to Go structs online. Generate Go struct definitions with proper types, json tags and nested struct support.

About JSON to Go Struct Converter

When working with JSON APIs in Go, you need struct definitions with proper types and json tags. Manually writing these structs is tedious and error-prone, especially for deeply nested JSON. This tool parses your JSON and generates idiomatic Go struct definitions automatically.

It infers the correct Go types for each field: string, int, float64, bool, and time.Time for ISO date strings. Nested objects become separate structs (or inline structs if you prefer), arrays are typed by their element type, and null values become pointer types. All json tags use the original field names. Everything runs in your browser. Your data stays on your device.