JSON to Go Structs
Paste JSON and get Go structs with json tags. More data tools
Generate Go structs from JSON
Each object becomes a struct with exported field names (id becomes ID, url becomes URL) and a json:"..." tag that keeps the original key. Optional keys get omitempty and nullable values become pointers.
Features
- Live: the result updates while you type.
- Clear errors: the line, the reason and, where possible, a one-click fix.
- Open and drop files, copy or download the result, and share your input as a link.
- Send to another tool: pass the result straight to a related tool.
- Private: Everything runs in your browser. Your data is not uploaded to any server.
Related data tools
- JSON to TypeScript: Paste JSON and get TypeScript interfaces.
- JSON to Python: Paste JSON and get Python dataclasses, TypedDicts or Pydantic models.
- JSON to Java: Paste JSON and get Java records or classes.
- JSON to C#: Paste JSON and get C# classes or records.
- All DataMint tools
Frequently asked questions
How are numbers typed?
Whole numbers become int (int64 when large) and decimals become float64.
Can I change the package name?
Yes, use the Package box.
Is my data private?
Everything runs in your browser. Your data is not uploaded to any server. You can even use the tool offline once the page has loaded.