G
GoTool

Go Struct Tag

Generate JSON/DB/GORM tags for Go structs

Input0
Output
0

About Go Struct Tag Generator

Generate and manage tags for Go struct fields. Add json, db, gorm, bson, and other tags with options like omitempty. Paste your Go struct and get tagged output instantly.

Frequently Asked Questions

What tag types are supported?

json, db, gorm, bson, xml, yaml, and form tags. You can also add omitempty to json tags.

How are field names converted to tag values?

Field names are automatically converted from PascalCase to snake_case for database tags and camelCase for json tags, following Go conventions.

Can I add tags to existing structs?

Yes, paste a Go struct with or without existing tags and the tool will add or replace tags based on your selections.