JSON to Go Struct Generator

Paste a JSON sample on the left, get idiomatic Go structs on the right — complete with json tags and proper Go types (string, int, float64, bool, time.Time where detectable).

100% Client-Side Instant No uploadYour data never leaves your browser

How to use this tool

Paste a representative JSON sample into the input on the left.

Go structs appear on the right after the quicktype engine loads (first run only — subsequent runs are instant).

Copy the output into a .go file. The root type is named Root by default; rename it to match your domain.

Generated structs include json tags so they work directly with encoding/json. Nested objects become nested structs; arrays become slices; nullable fields become pointers.

Everything runs in your browser — safe to use with internal API responses.

Frequently asked questions

Are json tags included?

Yes. Every field gets a json tag matching the original JSON key, so the generated structs marshal and unmarshal cleanly with encoding/json.

How are nullable fields handled?

Fields that appear as null in the sample become pointer types in Go (e.g. *string), allowing you to distinguish absent from zero values.

What about dates?

ISO 8601 date-looking strings can be inferred as time.Time. quicktype heuristics apply; verify against your actual data.

Can I generate other languages?

Yes — the main editor's Tools panel also offers TypeScript, Java, C#, Python, and Rust.

Is this private?

Completely. quicktype runs in your browser; no JSON is uploaded.

Related tools