jsonlkit.com
JSONL (JSON Lines) utilities, in the browser
Say hi →

JSONL Minifier

updated 12 May 2026

JSONL minifier. Compress a JSONL (JSON Lines) file: strip whitespace, optionally drop null and empty fields, optionally remove unwanted keys. Up to 1 GB, runs in your browser.

Minify

Drop a .jsonl file here, or Up to 1 GB · in your browser

What "minify" means here

By default, minification strips whitespace inside each record so every line becomes the tightest possible JSON. Toggle Drop null fields to remove keys whose value is null, and Drop empty to remove empty strings, arrays, and objects. You can also list keys to remove explicitly — handy for stripping fields like debug or internal_id before sharing a file.

Before you start

You need a .jsonl or .ndjson file (one JSON object per line). The minifier won't touch records it can't parse — broken lines are passed through as-is so you can fix them with the Auto-fixer first.

How to use it

  1. Drop a file or paste JSONL into the Input pane.
  2. Optional: tick Drop null fields to remove keys whose value is null.
  3. Optional: tick Drop empty to remove empty strings, arrays and objects.
  4. Optional: list keys you want gone in the Remove keys box (one per line, dot.notation supported for nested keys).
  5. Click Minify. The status bar shows bytes-in vs bytes-out and the percent saved.
  6. Click Download or Copy.

Options explained

Drop null fields

Removes any key whose value is exactly null. Useful before loading into a typed system (BigQuery, Parquet, Postgres) where null columns count toward your width.

Drop empty

Removes "", [] and {}. Aggressive but very effective for compressing sparse event logs.

Remove keys

Explicit key paths to delete, one per line. created_at drops the top-level key, meta.debug drops a nested key. Works across all records.

Example

Input (each line pretty-printed for clarity):

{ "id": 1, "user": "alice", "meta": { "debug": true, "ip": null } }
{ "id": 2, "user": "bob",   "meta": { "debug": false, "ip": "10.0.0.1" } }

With Drop null on and meta.debug in the remove list:

{"id":1,"user":"alice","meta":{}}
{"id":2,"user":"bob","meta":{"ip":"10.0.0.1"}}

Tips & common pitfalls

Frequently asked questions

Is the minified output still valid JSONL?

Yes. The JSONL spec requires one JSON value per line; this tool only removes whitespace inside each record and (optionally) keys you asked to drop. Each output line is still a single, valid JSON object.

Does it change number formatting?

No. Numbers are passed through JSON.stringify unchanged. 0.10 may become 0.1 only if your input already lost precision when parsed — that's a JS-engine behaviour, not this tool.

Does it preserve key order?

For ASCII keys, yes — modern JavaScript engines preserve insertion order. Numeric-looking keys ("0", "1") follow the JS Object spec and sort first.

Related tools