# jwalker

> A JSON pretty-printer for each line in a stream. Useful for JSON logs.

Latest version **3.0.93** (published 2026-10-05) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install jwalker
pnpm add jwalker
yarn add jwalker
bun add jwalker
```

Provides the command `jwalker`.

## Health

**Score 60/100 (C)** — status: active.

Positive: esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.0.93 |
| Published | 2026-10-05 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 14.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Kristian Trenskow |
| Maintainers | trenskow |
| Keywords | JSON, lint, pretty, print, line, readline, log, logs, stream |

## Links

- npm: https://www.npmjs.com/package/jwalker
- Repository: https://github.com/trenskow/jwalker
- Homepage: https://github.com/trenskow/jwalker#readme
- Issues: https://github.com/trenskow/jwalker/issues
- npm.io page: https://npm.io/package/jwalker

## Dependencies (1)

- [@trenskow/arguments-parser](https://npm.io/package/@trenskow/arguments-parser.md) ^0.3.166

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 3.0.93 (latest) — 2026-10-05
- 3.0.92 — 2026-10-05
- 3.0.91 — 2026-10-05
- 3.0.90 — 2026-10-05
- 3.0.89 — 2026-10-05
- 3.0.88 — 2026-10-05
- 3.0.87 — 2026-09-21
- 3.0.86 — 2026-09-21
- 3.0.84 — 2026-09-21
- 3.0.85 — 2026-09-21
- 3.0.83 — 2026-09-21
- 3.0.82 — 2026-09-18
- 3.0.81 — 2026-09-18
- 3.0.80 — 2026-09-16
- 3.0.79 — 2026-09-16
- … 85 more at https://npm.io/package/jwalker/versions

## README

jwalker
----

Parses a file stream for JSON and pretty prints it.

# Usage (CLI)

Using jwalker on the command line.

````
Usage: index.js <options>

Options:

  --input <input>    Input file (-- for stdin).
                     (default: `--`)

  --output <output>  Output file (-- for stdout).
                     (default: `--`)

  --spaces <spaces>  Use number of spaces for indentation.
                     (default: `        `)

  --passthrough      Passthrough non-JSON lines.
                     (default: disabled)
````

# Usage (code)

Using jwalker as a transform stream in node.js.

````javascript

const JWalker = require('jwalker');

readStream
	.pipe(new JWalker({ /* options */ }))
	.pipe(writeStream);

````

## Options

| Name                 | Type      | Description                                  | Default |
|:---------------------|:---------:|:---------------------------------------------|:--------|
| `passthroughNonJSON` | `Boolean` | Tells the transform to passthrough non-JSON. | `false` |
| `spaces`             | `Number`  | The number of spaces used per indentation.   | `4`     |

# License

See LICENSE.

---
_Source: https://npm.io/package/jwalker · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
