JSON Formatter
Paste JSON to pretty-print it with your chosen indent, or minify it onto a single line. Invalid JSON shows the parse error below.
Rejoins string values that a terminal or log viewer wrapped onto the next line, and escapes any other stray control characters. Line breaks between values are valid JSON and are left alone.
Instructions
Pretty-prints JSON so it is readable, or minifies it back down to one line.
- Paste JSON into the input — Paste pulls it straight from the clipboard.
- Choose Format and an indent (2 spaces, 4 spaces or tab), or Minify to strip all whitespace.
- Tick Auto-fix line breaks inside strings if the payload was copied out of a terminal or a log and a value is split across lines.
- The output updates as you type; Copy takes the result.
Tips
- If the input will not parse, the parse error shows in red above the output — it names the position, which is usually a trailing comma or an unquoted key.
- Auto-fix only runs after a normal parse has already failed, so valid JSON is never rewritten. It drops the line break so the value joins back up — a genuinely multi-line string is collapsed onto one line.
- The Indent select is disabled while minifying — there is nothing to indent.
- Hit Example and pick Format, Minify or Auto-fix to load a sample payload and see that action run.