yq

yq

YAML, JSON, XML, CSV, TOML and properties processor

Category
Text
License
MIT
Platforms
Windows macOS Linux
Released
2015
Path
c:\yq\yq.exe
Benefits
Has a GUI-mode that offers many features.
Notes
Written in Go.
Version
Latest known: 4.53.3 (2026-06-06)

Examples

1. Convert XML to JSON (safely)

yq.exe --xml-attribute-prefix "" -p=xml -o=json books.xml

2. Sanitize XML and save to a new file. Skip over directives and filter out XXE.

yq.exe --xml-skip-directives -p=xml -o=xml xxe.xml >xxe-sanitized.xml

3. Enable strict mode when parsing. Invalid items will return an error. https://pkg.go.dev/encoding/xml

yq.exe --xml-strict-mode --xml-skip-directives -p=xml -o=xml xxe.xml

Try it

Agree to terms to run demos.