JSONL Minifier
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
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
- Drop a file or paste JSONL into the Input pane.
- Optional: tick Drop null fields to remove keys whose value is
null. - Optional: tick Drop empty to remove empty strings, arrays and objects.
- Optional: list keys you want gone in the Remove keys box (one per line, dot.notation supported for nested keys).
- Click Minify. The status bar shows bytes-in vs bytes-out and the percent saved.
- 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
- Order matters in the pipeline. Validate first (Validator) → fix (Auto-fixer) → then minify. Otherwise broken lines silently pass through.
- Drop empty is destructive. An empty array
tags: []is information ("this record has no tags") in some schemas. Don't toggle it if downstream code distinguishes empty from missing. - Use the JSON-Schema validator (link) after minifying to confirm you didn't strip a required field by accident.
- Big wins on logs. Server-log JSONL with many optional fields often shrinks 30–60% with Drop null + Drop empty.
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.