Skip to content

gron

A command-line tool that flattens JSON into greppable lines of assignments.

Stars
14.5k
Forks
347
Licence
MIT
Language
Go
Last update
1.4 years ago
Type
CLI

No commits in over a year — check for forks or alternatives before adopting.

What it is

gron is a command-line tool written in Go that turns JSON into a flat list of simple assignment-style lines, so each value sits on its own line with its full path. Because each line is plain text, you can search it with ordinary tools like grep and then turn the result back into JSON. The project's description says its purpose is to make JSON greppable.

  • Flatten a nested API response into one path per line and search it with grep
  • Find the full path to a specific key or value inside a big JSON file
  • Convert the filtered lines back into JSON after searching

Great for

  • Developers who need to find a specific value in a large or deeply nested JSON response
  • People working in a terminal who already use grep, sed, or similar text tools
  • Anyone exploring an unfamiliar JSON API response to see its structure

Not ideal for

  • Users who need a graphical JSON viewer, since gron is a text-only command-line tool
  • People who only work with small JSON files where a text editor or browser is enough
  • Anyone who needs full details beyond what the README covers, since the README provided here was truncated and empty
Step-by-step guide: how to use gronInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Download the app

    Clone the repository

    git clone https://github.com/tomnomnom/gron
  2. 2

    Run it

    • Download the archive for your platform from the latest release (v0.7.1) and extract it
    • Put the gron binary somewhere on your PATH
    • Run gron on a JSON file or piped input to see the flattened output
    • Pipe the output through grep to find the lines you need
  3. 3

    Get the most out of it

    • Pipe gron output into grep to search for keys or values by name
    • Use the reverse mode to convert filtered lines back into JSON, as described in the full README

Downloads

Strengths

  • Simple idea: each value appears on one line with its complete path, which works well with standard text tools
  • Written in Go and distributed as prebuilt binaries for several operating systems in the latest release
  • MIT licensed and widely starred on GitHub

Trade-offs

  • The README text supplied here was truncated, so exact usage details could not be confirmed
  • Flattened output can become long for very large documents
  • Requires comfort with the command line

How it compares

ProjectStarsTypeLevelUpdatedBest for
gron (this)14.5kCLIbeginner1.4 years agoDevelopers who need to find a specific value in a large or deeply nested JSON response
fx20.7kCLIbeginner15 days agoDevelopers who work with JSON output from APIs or log files in the terminal
yq16.2kCLIbeginner8 days agoDevelopers who regularly edit YAML config files in scripts or CI pipelines
json-server75.7kDev toolbeginner8 months agoFront-end developers who need a backend stub while the real API is not ready
json50.8kLibrarybeginner4 days agoC++ developers who need to read or write JSON in an application
cli24.3kLibraryintermediate5 days agoGo developers writing a command line tool with subcommands and flags

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.