whatisgithub

What is json.minify?

getify/json.minify — explained in plain English

Analysis updated 2026-08-04 · repo last pushed 2024-02-06

417Audience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A tool that removes comments and extra whitespace from JSON files, giving you compact, valid JSON. It lets you write readable, commented JSON during development and strip it out before sending the data anywhere.

Mindmap

mindmap
  root((repo))
    What it does
      Removes JSON comments
      Strips extra whitespace
      Outputs valid compact JSON
    Use cases
      Clean config files
      Reduce network transfer size
      Keep commented JSON in codebase
    Tech stack
      JavaScript
      PHP
      Python
      Objective C
    Audience
      Developers
      DevOps teams
      API builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add helpful comments to your JSON config files and strip them out before deployment.

USE CASE 2

Keep a readable, annotated JSON settings file in your codebase and compress it before sending it from server to browser.

USE CASE 3

Reduce network transfer size by minifying JSON data after development is complete.

What is it built with?

JavaScriptPHPPythonObjective C

How does it compare?

getify/json.minifyposeljacob/agentic-video-editorx1xhlol/better-clawd
Stars417417417
LanguagePythonTypeScript
Last pushed2024-02-062026-04-30
MaintenanceDormantMaintained
Setup difficultyeasymoderateeasy
Complexity2/53/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Multiple language versions are spread across separate Git branches, so you need to switch to the branch matching your stack.

The explanation does not mention a specific license, so the permissions for using this code are unclear.

So what is it?

JSON Minify is a tool that cleans up JSON files by stripping out comments and extra whitespace, leaving behind compact, valid JSON that any standard parser can read. The core benefit is simple: you get to write and maintain JSON files with helpful comments and readable formatting during development, then strip all that out before the data is actually used or sent anywhere. JSON is a popular format for storing and exchanging data, but the official standard doesn't support comments. That means if you add notes to your JSON file to explain what each field does, standard parsers will reject it. This tool solves that problem by acting as a middle step. You feed it your human-friendly, commented JSON, and it hands back a compressed, comment-free version that won't cause errors. Anyone who works with configuration files or data files in JSON format would find this useful. For example, a team might have a large JSON settings file where developers add comments explaining each option. They can keep that readable version in their codebase, then run it through the tool before sending the data from a server to a browser, keeping network transfers small and avoiding parse errors. The project originally launched as a JavaScript library, but it has since been adapted for several other programming languages, including PHP, Python, and Objective C. The different versions are organized into separate branches within the same repository, so you can find the one that matches your technology stack. The README references a historical discussion about why JSON doesn't officially include comments, which provides context for why a separate cleanup tool is needed rather than just expecting parsers to handle it natively.

Copy-paste prompts

Prompt 1
I have a JSON file with comments and extra whitespace that I need to minify. Show me how to use the getify/json.minify JavaScript library to strip comments and compress it into valid JSON.
Prompt 2
I need to minify commented JSON in a PHP project. Show me how to use the PHP branch of getify/json.minify to remove comments and whitespace from my config file.
Prompt 3
Help me set up getify/json.minify in a Node.js build script so that any commented JSON files in my project are automatically minified into valid, compact JSON before deployment.

Frequently asked questions

What is json.minify?

A tool that removes comments and extra whitespace from JSON files, giving you compact, valid JSON. It lets you write readable, commented JSON during development and strip it out before sending the data anywhere.

Is json.minify actively maintained?

Dormant — no commits in 2+ years (last push 2024-02-06).

What license does json.minify use?

The explanation does not mention a specific license, so the permissions for using this code are unclear.

How hard is json.minify to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is json.minify for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.