Skip to content
XUtilHub

JSON to Multi-line (Pretty Print)

Expand single-line JSON into readable multi-line JSON with indentation. Free online JSON pretty printer.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
Input
Output

About the JSON to Multi-line

Expand single-line JSON into nicely indented, multi-line JSON that's easy to read.

Key features

  • Expands single-line JSON into readable multi-line JSON
  • 2-space, 4-space or tab indentation
  • Validates input with line and column errors
  • Ideal for log lines, env vars and API responses
  • Copy or download the result
  • Runs in your browser

Make one-line JSON readable

Logs, environment variables, network traces and compact API responses deliver JSON on a single line. It's efficient but nearly impossible to read once it's longer than a sentence. JSON to Multi-line expands it with proper indentation so you can see the structure.

{"order":{"id":1001,"items":[{"sku":"A1","qty":2}],"paid":true}}

becomes

{
  "order": {
    "id": 1001,
    "items": [
      {
        "sku": "A1",
        "qty": 2
      }
    ],
    "paid": true
  }
}

Where one-line JSON comes from

  • Application logs in JSON format (Serilog, Winston, Pino, Logback JSON encoders).
  • Kubernetes and Docker logs viewed with kubectl logs or docker logs.
  • Environment variables holding JSON configuration.
  • Network tabs and HAR files, where response bodies are often minified.
  • Message queues and webhooks.

Quick workflow for logs

  1. Copy the log line.
  2. Delete everything before the first { and after the last }.
  3. Paste it here; if it's full of \", use JSON Unstringify instead.

Go back to a single line with JSON to One Line. For interactive exploration, use the JSON Viewer.

How to use the JSON to Multi-line

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The Multi-line appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

Is this the same as the JSON Formatter?

The output is the same pretty-printed JSON. This page focuses on expanding one-line JSON taken from logs, environment variables or command output.

My log line has text before the JSON. Will it work?

Remove anything before the opening { or [ and after the closing } or ] first. Timestamps and log levels outside the JSON aren't valid JSON.

The JSON is wrapped in quotes with backslashes.

That's stringified JSON. Use JSON Unstringify, which removes the escaping and formats the result.

Which indentation should I choose?

2 spaces is the most common for reading and for JavaScript projects. 4 spaces suits Python and Java style guides.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools