PHPackages                             codegear/json-formatter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. codegear/json-formatter

ActiveTool[Parsing &amp; Serialization](/categories/parsing)

codegear/json-formatter
=======================

Command-line tool to pretty-print JSON string for human readability

1.0.2(7y ago)1103GPL-3.0PHPPHP &gt;=7.0.0

Since Jul 29Pushed 6y agoCompare

[ Source](https://github.com/whitephp/json-formatter)[ Packagist](https://packagist.org/packages/codegear/json-formatter)[ Docs](https://github.com/whitephp/json-formatter)[ RSS](/packages/codegear-json-formatter/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

jf: JSON Formatter
==================

[](#jf-json-formatter)

Command-line tool to pretty-print JSON string for human readability by PHP.

Requirements
------------

[](#requirements)

PHP needs to be a minimum version of PHP 7.0.0.

Installation
------------

[](#installation)

Globally by using [Composer](https://getcomposer.org/):

```
$ composer global require codegear/json-formatter
```

Usage
-----

[](#usage)

### In Command-Line

[](#in-command-line)

Format file `data.json` and output to screen:

```
$ jf data.json
```

Format file `data.json` and save to another file `data_formatted.json`:

```
$ jf data.json > data_formatted.json
```

### In VIM

[](#in-vim)

Format current file:

```
:%!jf %
```

or add a keymap in `vimrc`:

```
nnoremap jf :%!jf %
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 77.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2847d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/50379759?v=4)[whitePHP.net](/maintainers/whitephp)[@whitephp](https://github.com/whitephp)

---

Top Contributors

[![fanlei](https://avatars.githubusercontent.com/u/1195782?v=4)](https://github.com/fanlei "fanlei (14 commits)")[![whitephp](https://avatars.githubusercontent.com/u/50379759?v=4)](https://github.com/whitephp "whitephp (4 commits)")

---

Tags

jsonformatter

### Embed Badge

![Health badge](/badges/codegear-json-formatter/health.svg)

```
[![Health](https://phpackages.com/badges/codegear-json-formatter/health.svg)](https://phpackages.com/packages/codegear-json-formatter)
```

###  Alternatives

[justinrainbow/json-schema

A library to validate a json schema.

3.6k316.9M612](/packages/justinrainbow-json-schema)[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[jms/serializer

Library for (de-)serializing data of any complexity; supports XML, and JSON.

2.3k135.8M851](/packages/jms-serializer)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[ergebnis/json-printer

Provides a JSON printer, allowing for flexible indentation.

9138.2M24](/packages/ergebnis-json-printer)[colinodell/json5

UTF-8 compatible JSON5 parser for PHP

30422.2M45](/packages/colinodell-json5)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
