Output will appear here
Output will appear here
Convert JSON to Go structs with proper json tags using our free JSON to Go struct generator. The tool infers int64, float64, and pointer types automatically, produces idiomatic PascalCase field names, and generates separate struct types for nested objects. A fast way to bootstrap Go data models from any API response.
Try Convert All - paste JSON once, see TypeScript, Go, YAML, and 15 more formats instantly.
Enter a JSON object or array in the input editor. The converter supports deeply nested structures, arrays of objects, and mixed-type fields.
The output pane shows Go structs with exported fields, json struct tags, and correctly inferred types like string, int64, float64, and bool.
Copy the structs to your clipboard or download a .go file you can add directly to your Go package.
JSON numbers without a decimal point are typed as int64, while numbers with decimals become float64. This heuristic matches the most common Go usage and avoids unnecessary floating-point overhead for integer IDs and counts.
Yes. Every exported field includes a json:"original_key" struct tag so encoding/json will marshal and unmarshal using the original JSON key name, even though Go field names are PascalCase.
Fields with null values in the sample JSON are generated as pointer types (e.g., *string). This lets Go distinguish between a missing/null field and a zero-value field during unmarshaling.
Yes. Use the URL-fetch feature to load a JSON response from any public API, and the converter will produce Go structs immediately. This is especially handy when building HTTP clients with net/http.