JSON_minify
A simple script to minify valid JSON, containing C/C++ style comments
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-minifyuv
uv add json-minifypoetry
poetry add json-minifyInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
htmlmin2Minifies HTML by removing unnecessary…
permissive · top 5,000 on PyPI
python-minifierTransforms Python source code into compact,…
permissive · top 15,000 on PyPI
jstylesonParses JSON strings that contain…
permissive · top 15,000 on PyPI
htmlminMinifies HTML by removing unnecessary…
permissive · top 5,000 on PyPI
json-with-commentsParses and serializes JSON with support for…
permissive · top 15,000 on PyPI
rjsminrjsmin minifies JavaScript code by removing…
permissive · top 5,000 on PyPI
gronTransforms JSON into grep-able line-by-line…
permissive · top 15,000 on PyPI
jsminMinifies JavaScript code by removing…
permissive · top 5,000 on PyPI
django-htmlminMinifies HTML by removing whitespace and…
permissive · top 5,000 on PyPI
jsonc-parserParses JSON files with comments (.jsonc) and…
permissive · top 15,000 on PyPI