skillfed

JSON_minify

A simple script to minify valid JSON, containing C/C++ style comments

json-minify v0.3.0 88.6K downloads/30d#13,716 on PyPI417
Permissive license MIT DORMANT released

What it is and what it does

JSON-minify is a Python port of the JavaScript JSON-minify utility that strips whitespace and removes JavaScript-style comments from JSON-like input to produce valid, minified JSON. It lets you write human-readable JSON with comments during development, then minify the content before parsing or sending it over the network.

The package has no runtime dependencies and installs with low friction. However, it has been dormant since late 2017 with no active maintenance, so it is unlikely to receive updates for new Python versions, edge cases, or compatibility issues. The MIT license is permissive and poses no legal barrier to use.

Use it for:

  • Strip comments and whitespace from JSON configuration files before parsing them in production code
  • Reduce JSON payload size for transmission in bandwidth-constrained environments
  • Convert developer-friendly annotated JSON (with comments) into valid JSON for APIs or data interchange

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Minifies JSON by removing whitespace and JavaScript-style comments (// and /* */) to produce valid, compact JSON suitable for parsing or transmission.

Yes, if you need to minify JSON with comment removal and can tolerate dormant maintenance. The package is simple, has no dependencies, and carries no security vulnerabilities. However, verify compatibility with your Python version first, and consider whether the lack of active maintenance poses a risk for your use case—if you need ongoing support or encounter bugs, you may need to fork or find an actively maintained alternative.

Install

json-minify on PyPI

pip

pip install json-minify

uv

uv add json-minify

poetry

poetry add json-minify

Installing JSON_minify

Before you install

Low friction installation with no runtime dependencies. Maintenance is dormant—last release was 2017-10-10 and no commits since 2024-02-06—so expect no active bug fixes or feature updates.

License in practice

MIT license is permissive, allowing use in proprietary and open-source projects with minimal restrictions; attribution is required but no copyleft obligations apply.

Quickstart

pip install JSON-minify

import json_minify
minified = json_minify.json_minify('{"key": "value" /* comment */}')

Verify before relying

  • Whether the package handles edge cases in comment parsing (nested comments, escaped quotes within comments) as robustly as the original JavaScript implementation
  • Current Python version compatibility—classifiers list Python 2 and 3 but requires_python is empty; unclear if it still works on modern Python 3.x releases

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 3,230 days since the last release
Last repo commit
First released
Downloads 88,574/month — #13,716 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: JSON_minify-0.3.0-py2.py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Utilities

Tags

json minify remove commentsminify json whitespacecompact json with commentsjson comment stripperreduce json sizejson compression utility
json-processingminification

More Utilities packages