Yq

github.com/mikefarah/yq Text Tools Open-source projectOpen source

yq processes YAML, JSON, XML, CSV, TOML, HCL, and properties files from the command line.

github.com/mikefarah/yq
Yq homepage screenshot

About Yq

yq is an open source command-line processor for reading and changing structured data files. The homepage describes it as a processor for YAML, JSON, XML, CSV, TOML, HCL and properties files, and the README also lists INI, KYAML and TSV. It uses query syntax similar to jq, a widely used JSON processor, so users can read values, update files, merge files and convert between formats from the terminal.

yq is written in Go and distributed as a binary for each supported platform, with installation options that include Homebrew, snap, Docker and Podman. It does not implement everything jq does. The project states that it supports the most common jq operations and functions, and that more are being added over time.

Key features

  • Reads values using jq-style path expressions such as '.a.b[0].c'
  • Updates files in place with the -i flag
  • Sets values from environment variables using strenv()
  • Merges multiple files, including files matched by glob patterns
  • Converts between formats, such as JSON to YAML and XML to YAML
  • Provides dependency-free binaries for multiple operating systems and architectures
Best for: Developers, system administrators and others who edit YAML, JSON or XML configuration files from the command line and want jq-style queries.
Good for
  • Distributed as a dependency-free binary written in Go
  • Available through several package managers, Docker and Podman
  • Open source
Watch out for
  • Does not yet support everything jq does
  • The snap version uses strict confinement and has no direct access to root files, so it requires workarounds such as piping through sudo tee

Yq at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

Yq alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Text Tools

Well-known listings from the same topic.

All 248

Yq FAQ

Does yq support every jq feature?
No. The project says it supports the most common jq operations and functions, and that more are being added continuously.
How do I update a YAML file in place?
Use the -i flag with an expression, for example: yq -i '.a.b[0].c = "cool"' file.yaml
Why can the snap version not write to root-owned files directly?
The snap installs with strict confinement, which means it does not have direct access to root files. The README shows workarounds that pipe the content through sudo tee or sponge.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing