DEV Community

Bobo
Bobo

Posted on

json-tidy: Format, Validate, and Transform JSON from Your Terminal

json-tidy: Format, Validate, and Transform JSON from Your Terminal

JSON is everywhere — config files, API responses, data exports. But raw JSON can be a nightmare to read and work with. json-tidy is a zero-fuss CLI tool that makes JSON beautiful.

Installation

npm install -g json-tidy-pro
Enter fullscreen mode Exit fullscreen mode

Quick Start

Format a JSON File

json-tidy-pro format messy.json -o pretty.json
Enter fullscreen mode Exit fullscreen mode

Validate JSON

json-tidy-pro validate config.json
# ✅ Valid JSON!
Enter fullscreen mode Exit fullscreen mode

Minify (for production)

json-tidy-pro minify data.json -o data.min.json
Enter fullscreen mode Exit fullscreen mode

Convert CSV to JSON

json-tidy-pro convert data.csv -o data.json
Enter fullscreen mode Exit fullscreen mode

Why json-tidy?

  • Simple - One command does it all
  • Fast - Handles large JSON files instantly
  • Reliable - Strict validation catches malformed JSON
  • No config - Works out of the box

Example Workflow

# Download API response, validate, format, extract
curl https://api.example.com/data | json-tidy-pro validate
curl https://api.example.com/data | json-tidy-pro format > formatted.json
json-tidy-pro minify formatted.json -o production.json
Enter fullscreen mode Exit fullscreen mode

Links

💻 GitHub: github.com/lb1192176991-lab/json-tidy-pro

🌐 Visit us: https://www.tucaowall.vip/


Part of a growing toolkit collection. Check out the other utilities for more productivity gains!

☁️ Get free DigitalOcean credit: https://m.do.co/c/fc5cb7b29a0d

Top comments (0)