Format JSON Logs Online — NDJSON & JSON Prettify
Pretty-print a JSON log document or compact NDJSON lines in your browser. Indent applies to single documents only — all processing stays local.
Developer notes
• Uses JSON.parse + JSON.stringify only (no silent beautify catch). • Single-document mode when the whole paste parses as one JSON value. • Multi-record mode: one compact JSON object/array per non-empty line. • Indent applies to single-document mode only. • CRLF is normalized to LF before parsing.
Options
When teams pick this route
• Pretty-print a pasted application log object for reading. • Normalize messy NDJSON exports before sharing. • Convert pretty multi-line dumps back to one-line-per-event streams. • Pair with filter-json-logs for triage.
Worked examples
Rich single JSON document
Before
After format
Multi-line NDJSON (indent ignored)
Before
After format
Navigate related log tools
Filter events with filter JSON logs, validate streams via validate NDJSON, or open the logs hub. For single-document JSON see JSON formatter.
JSON log formatter FAQ
Document vs NDJSON
Why does indent not change NDJSON output?
When multiple JSON records are detected, output stays compact one-JSON-per-line (true NDJSON). Indent only applies when the whole paste is a single JSON document.
How is this different from JSON formatter?
JSON formatter targets one document. This tool also handles line-oriented NDJSON and documents the multi-record path honestly.
What are the size limits?
1 MiB per paste and at most 20 000 non-empty lines for format/filter. Oversized input returns an error instead of truncating.
More log tools in this cluster
Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.