JSON to Go Struct

Generate Go struct definitions with JSON tags.

Features

  • Struct Generation: Creates Go struct definitions compatible with standard encoding/json.
  • Tagging: Automatically adds `json:"key"` tags.
  • Nested Structs: Handles nested objects by defining inline array rules or sub-structs (simplified).
  • Type inference: Maps JSON types to Go types (string, int, float64, bool, []interface{}).

How to Use

  • Paste JSON into the input area.
  • The tool generates the corresponding Go struct.
  • Copy the code to your Go application.