Format JSON Logs Online — NDJSON & JSON Prettify

Pretty-print a JSON log document or compact NDJSON lines in your browser. Auto-format on paste; 2-space indent for single documents only — all processing stays local.

Loading…
JSON log formatter — document or NDJSON
Beautify one JSON blob or normalize multi-line NDJSON to compact one-JSON-per-line output. Processing stays in your browser.

Developer notes

• Single JSON documents pretty-print with 2-space indent; multi-record NDJSON stays compact. • Auto-format on paste/upload/sample; manual edits use the Format button (⌘↵). • Multi-record NDJSON shows a warning in the results panel (indent not applied). • Pair with validate-ndjson and filter-json-logs.

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

{"ts":"2026-07-12T10:01:22.104Z","level":"info","service":"checkout-api","traceId":"a1b2c3d4e5f6","msg":"request completed","http":{"method":"POST","path":"/v1/orders","status":201,"durationMs":42},"user":{"id":"usr_9182","plan":"pro"},"meta":{"region":"eu-west-1","build":"1.8.15","features":["payments","inventory"]}}

After format

{ "ts": "2026-07-12T10:01:22.104Z", "level": "info", "service": "checkout-api", "traceId": "a1b2c3d4e5f6", "msg": "request completed", "http": { "method": "POST", "path": "/v1/orders", "status": 201, "durationMs": 42 }, "user": { "id": "usr_9182", "plan": "pro" }, "meta": { "region": "eu-west-1", "build": "1.8.15", "features": [ "payments", "inventory" ] } }

Multi-line NDJSON (indent ignored)

Before

{"a":1} {"b":2}

After format

{"a":1} {"b":2}

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 (fixed 2 spaces) 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.

Logs & observability

Line-oriented JSON/NDJSON and Nginx/Apache access logs — format, filter, validate, and CSV/TSV.

Explore other tool categories

Minify

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.

Beautify

Make code readable with consistent indentation — beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.

Unminify

Expand minified or compressed code — unminify JavaScript, CSS, TypeScript, SCSS, LESS, SQL, YAML and other formats when debugging or reviewing.

Conversion

Transform data between JSON, YAML, XML and CSV locally — no server uploads.

CSS preprocessors

Compile SCSS or LESS to standard CSS in the browser — pair with beautify or minify for a full stylesheet workflow.

JSON Tools

Validate, format, diff and explore JSON payloads — complementary to minifiers and converters.

SVG Tools

Preview, optimize with SVGO, export Data URI, resize, beautify, convert to JSX and validate SVG — all in your browser.

DevOps & Infra

Terraform HCL format/validate/minify, Dockerfile format & lint, Docker Compose and .env validation.

CI/CD

GitHub Actions and GitLab CI — format YAML and check workflow/job structure in your browser.

Kubernetes

Multi-doc manifests, structural validate, Ingress/Deployment starters, and Helm values formatting.

Networking / IP

CIDR, subnets, and IPv4/IPv6 helpers — in your browser.

Security & tokens

JWKS, X.509 certificates, and secrets scan — browser-local.

API & schemas

OpenAPI tools to format, validate, and lint your specs.

Encoding

Encode or decode Base64, URL components and HTML entities — client-side only.

Developer utilities

Timestamps, UUID, ULID, Nanoid, cron, passwords, regex, slugify, number bases, case, text diff, and chmod — all client-side.

Text & Markdown

Count words, build Markdown TOCs, and clean line lists — all in your browser.

AI & LLM

Token counting, pricing estimates, and context-window fit — 100% browser-local.

Serialization

Serialize and deserialize PHP data structures beside JSON workflows.