JSON to Go Struct Converter

Paste a JSON payload and get Go structs with json tags, ready for encoding/json. Nested objects become their own named struct types.

Example

Input
{
  "name": "parsebox",
  "version": "2.1.0",
  "private": false,
  "maintainers": [
    { "name": "Ada Lovelace", "email": "[email protected]", "active": true },
    { "name": "Alan Turing", "email": "[email protected]", "active": false }
  ],
  "build": {
    "target": "es2022",
    "minify": true,
    "port": 5173
  }
}
Output
type Root struct {
	Name        string       `json:"name"`
	Version     string       `json:"version"`
	Private     bool         `json:"private"`
	Maintainers []Maintainer `json:"maintainers"`
	Build       Build        `json:"build"`
}

type Maintainer struct {
	Name   string `json:"name"`
	Email  string `json:"email"`
	Active bool   `json:"active"`
}

type Build struct {
	Target string `json:"target"`
	Minify bool   `json:"minify"`
	Port   int64  `json:"port"`
}

Private by design

ParseBox runs entirely in your browser. Your text is never uploaded, logged or stored on a server, so it is safe to paste API responses, tokens and config files.

Related conversions

All 30 formats in ParseBox →