Skip to main content

JSON to Go Struct

Convert JSON to idiomatic Go struct definitions with proper types and json tags. Runs in your browser — nothing is sent to a server.

Samples:

How to Use JSON to Go Struct

  • Paste your JSON into the left panel or click a sample to load one.
  • Set the root struct name using the input field (defaults to Root).
  • Enable omitempty to add ,omitempty to all json tags.
  • Enable Pointer for nullable to use pointer types (*string) for null JSON values.
  • Nested objects and arrays of objects automatically generate additional named structs.
  • Copy the result to clipboard using the Copy button on the right panel.

Specifications

Accepts
Text — type or paste
Gives you
copy to clipboard
Where it runs
Your browser — the file is never uploaded
Sign-up
None
Cost
Free, with no usage limits