Go Struct Tag Generator
Paste a Go struct and generate json, bson, and validate tags with consistent naming.
Go Struct Tag Generator
Paste a Go struct (or a field list) and generate json / bson / validate tags in one pass.
Parser is intentionally simple — works on standard field lines. Existing backticks are replaced. Validate hints are starting points, not a full rule engine.
Common Tag Sets
| Stack | Typical tags |
|---|---|
| REST JSON APIs | json |
| MongoDB + Go driver | json + bson |
| Request validation | json + validate |
Naming conventions matter: pick snake_case or camelCase once and stick to it across services.
