JSON → Go

Generate Go structs with json tags from a JSON sample.

Private by design. Your input never leaves this browser. Conversions run locally on your device.

What this tool handles

  • Emits Go structs with JSON tags matching the original key names.
  • The package line and omitempty tags can each be switched off.
  • Nested objects become their own named structs.
  • Pointer types are not generated; nullable fields fall back to interface{} or the zero value.

Example

JSON sample

{"id":1,"name":"Ada","active":true}

Go

package main

type Root struct {
	ID     int    `json:"id"`
	Name   string `json:"name"`
	Active bool   `json:"active"`
}

Related tools

Browse all 25 tools