JSON Formatter

Format / Validate

Format, minify, validate, escape, and unescape JSON.

0 chars

Paste text on the left to see the cleanup in action.

Awaiting processing...
1

Input

Paste your messy text or data into the source field.

2

Options

Adjust tool settings to customize the transformation.

3

Result

Copy or download your clean results instantly.

How to use this tool

1

Paste your raw JSON into the input field.

2

Select "Format" to pretty-print or "Minify" to compress the JSON.

3

If the JSON is invalid, a helpful error message will show the location of the issue.

4

Use "Escape" to convert JSON to a string safe for code, or "Unescape" to reverse it.

Common uses

  • Making minified API responses readable
  • Validating JSON configuration files
  • Minifying JSON for storage or transit
  • Escaping JSON for use in source code or documentation

Privacy is built-in

Standard tools at BetterPaste perform all processing locally in your web browser. Your data is never intentionally sent to our servers for processing.

Example

Input
{"id":1,"name":"test"}
Output
{
  "id": 1,
  "name": "test"
}

Pretty-printing minified JSON.

Related Tools

Browse all tools