gojq
Pure Go implementation of jq command-line JSON processor with arbitrary-precision arithmetic and YAML support
gojq is a pure Go implementation of the jq command-line JSON processor. It processes JSON data using jq's query language syntax, supporting operations like filtering, mapping, and transforming structured data. The tool can be used both as a standalone command-line utility and embedded as a Go library.
Unlike the original jq, gojq is completely portable with no C dependencies and supports arbitrary-precision integer arithmetic, preventing precision loss with large numbers. It includes additional features like YAML input/output support (--yaml-input and --yaml-output flags), string indexing, and improved time formatting functions. The tool maintains compatibility with most jq functionality while fixing several behavioral issues present in the original implementation.
Developers working with JSON data processing, API responses, or configuration files will find gojq useful for command-line data manipulation tasks. The Go library interface allows integration into applications that need programmatic JSON querying capabilities, with functions like gojq.Parse() for query compilation and iterator-based result processing.
Installation
# via Homebrew
brew install gojq
# via Go
go install github.com/itchyny/gojq/cmd/gojq@latest
# via mise
mise use -g gojq@latest
Alternatives & related tools
lazysql
Cross-platform TUI database management tool for MySQL, PostgreSQL, SQLite, and MSSQL with SQL editor and table operations.
jqp
A terminal UI for running jq queries interactively against JSON or NDJSON input, using the gojq implementation, with themes and query history.
Skate
A local personal key-value store CLI for saving and retrieving text or binary data, with named databases and pipe-friendly output.
jid
Interactive JSON explorer that takes piped input and lets you drill down with dot-path or JMESPath queries, with tab completion and suggestions.
qo
TUI for querying JSON and CSV files with SQL syntax, reads from stdin and outputs to stdout
add a badge to your README
Maintain gojq? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/gojq?utm_source=badge)<a href="https://www.trmn.sh/tools/gojq?utm_source=badge"><img src="https://www.trmn.sh/badge/gojq.svg" alt="Featured on trmn" height="20"></a>