PDFKhata

JSON formatter

Pretty-print, minify and validate JSON.

Files never leave your device

How to use JSON formatter

Paste messy or one-line JSON and get it neatly indented, or squeeze it down to a single line. If the JSON is invalid, you see the line and column of the problem. Because nothing is sent to a server, it is safe for API responses that contain tokens or customer data.

  1. 1

    Paste JSON, open a file, or drop one in.

  2. 2

    Choose Format or Minify, and the indent style.

  3. 3

    Tick Sort keys A→Z if you want keys in order.

  4. 4

    Copy the result or click Download JSON.

JSON formatter: common questions

How do I find the error in my JSON?

Paste it in. Invalid JSON shows an error with the line and column, which usually points to a missing comma, an extra trailing comma or an unquoted key.

What does minify JSON do?

It removes all spaces and line breaks that aren't needed, giving the smallest valid JSON for sending over a network or storing.

Will very large numbers stay exact?

Numbers beyond JavaScript's safe range get rounded, and the tool warns you when that happens. Store such IDs as strings if they must stay exact.

More Data & Text tools