Ctrl + K
HomeAPI ToolsJSON to Go Struct
Free Developer Tool

JSON to Go Struct

Convert JSON data into Go struct definitions automatically.

What is JSON to Go Struct?

Generate Go structs with JSON tags automatically.

How to use

  1. Paste JSON.
  2. Generate structs.
  3. Copy Go code.

Features

  • Struct generation
  • JSON tags
  • Nested support
  • Array support
  • Developer friendly

Example

Input
{
  "id": 1,
  "name": "John"
}
Output
type Root struct {
    ID int `json:"id"`
    Name string `json:"name"`
}

FAQ

Are JSON tags generated?

Yes. Generated structs include JSON tags.

Can nested objects be converted?

Yes. Nested structs are generated automatically.

Is this tool free?

Yes. Completely free.