Developer utilities

JSON Formatter & Validator

Format, validate and minify JSON locally in the browser.

0 characters

Press Ctrl/⌘ + Enter to format. Everything runs locally in your browser, up to 5,000,000 characters. Nothing is sent to the server or stored.

Results appear here. Paste JSON, then choose Format, Minify or Validate.

How to use the JSON formatter

  1. Paste JSON into the input box, or select Example to load a sample document.
  2. Choose an indent of two spaces, four spaces or a tab.
  3. Select Format, Minify or Validate. The result appears below the input.
  4. Use Copy JSON to put the output on your clipboard.

Formatting and validation run entirely in your browser and are never sent to FKINFAST servers. Nothing you paste is stored, logged or shared.

What counts as valid JSON

  • Strings and property names use double quotes, never single quotes.
  • No trailing commas after the last item in an object or array.
  • No comments, and no unquoted property names.
  • Values are limited to strings, numbers, booleans, null, arrays and objects. NaN, Infinity and undefined are not valid.
  • A document can be a single value such as 42 or "text", though objects and arrays are the common case.

Common JSON errors and how to fix them

Trailing comma
{"a": 1,}Remove the comma before the closing brace or bracket. JSON allows a comma only between items.
Single quotes or unquoted property names
{'a': 1} or {a: 1}Wrap every property name and string value in double quotes: {"a": 1}.
Comments
{"a": 1} // noteDelete the comment. JSON has no comment syntax, so store notes somewhere else.
Missing comma between items
{"a": 1 "b": 2}Add a comma between members: {"a": 1, "b": 2}.
Truncated or unclosed input
{"a": [1, 2Check the end of the document for closed brackets and a complete paste.
Unsupported values
NaN, Infinity, undefinedUse null or a finite number instead. JSON supports only numbers, strings, booleans, null, arrays and objects.

JSON formatting FAQ

Does formatting change my values?

No. FKINFAST validates with the browser's native JSON parser and then rewrites only the whitespace between tokens. Numbers, string escapes and property order are emitted exactly as written, so large integers and long decimals keep their original text.

Why keep the original number text?

Many formatters parse and re-serialize your document, which can round large integers such as 12345678901234567890 or scientific notation that overflows a JavaScript number. FKINFAST avoids that by preserving the original tokens.

What happens to duplicate keys?

The formatter preserves duplicate keys exactly as written. When a JSON parser reads the document, the last duplicate wins, so remove duplicates if the result matters to you.

Is there an input size limit?

The in-browser formatter accepts up to 5 million characters per document. Above that, split the document or use a desktop editor so the page stays responsive.