Format, validate & minify · local in your browser

JSON formatter

Format or minify JSON locally. Keep large numbers, duplicate keys and string escapes.

Local · no upload

Up to 200,000 UTF-16 units. Text clears when you leave or refresh.

Read only

Numbers, string escapes and duplicate keys keep their original spelling.

Format or minify JSON without uploading it

  1. Paste into Your JSON, or choose Try example when the input is empty.
  2. Choose 2 spaces, 4 spaces or Minify, then select Format JSON.
  3. Review the result and select Copy formatted JSON. If clipboard access fails, select and copy the read-only output yourself.

Editing input or changing the output style clears the previous result, copy receipt and feedback receipt. Clear removes the input and output. Text stays only in this page’s memory and clears when you leave or refresh. Copy it before using another tool.

Strict JSON, with original numbers and duplicate keys

This tool accepts JSON objects, arrays, strings, numbers, true, false and null. It rejects comments, trailing commas, single quotes, unquoted keys, NaN and Infinity. It reports a syntax position and does not repair or partially format invalid JSON.

{"id":9007199254740993,"id":1e400,"value":-0}

Formatting keeps both id keys, their order and the exact number spellings. It does not round numbers, sort keys, remove duplicate keys or decode string escapes.

Minify removes only JSON whitespace between tokens, leaving spaces inside strings untouched. Empty objects and arrays stay compact. Pretty output uses LF line breaks and has no final newline.

Input is limited to 200,000 UTF-16 units, output to 600,000 units and container nesting to 200 levels. Over-limit input stays intact; over-limit output is rejected without truncation. An emoji may use two UTF-16 units.

Error offsets start at zero; displayed lines and columns start at one and count UTF-16 units. CRLF counts as one line break in the formatter. Browser textareas may normalize pasted CR and CRLF to LF. Positions describe the text actually received by the textarea, not original clipboard bytes.

String spelling, Unicode escapes and unpaired surrogates are preserved as allowed by JSON grammar. This is not Unicode normalization, a security check or a guarantee that every other JSON consumer accepts the same Unicode or numeric range.

Copy your text first, then count words and characters, change text case or inspect hidden characters. Content is never transferred automatically between tools.

No file import, URL import or automatic clipboard reading is used. Clipboard writing happens only after your explicit copy action. Read about privacy and optional analytics.

Last reviewed: 2026-10-24

Starting with table rows? Use CSV to JSON to convert CSV or TSV with all values kept as strings.