EveryTask

Dev Tools

JSON Formatter: Format JSON and Understand Parse Errors

Format valid JSON for easier reading, understand common parse errors, and know when formatting is not the same as schema validation.

Minified JSON is hard to inspect, especially when you are debugging an API response or a configuration file. Formatting adds indentation and line breaks so the structure is easier to read; it does not change the meaning of valid JSON.

Format JSON in EveryTask

  1. Open the JSON formatter.
  2. Select JSON.
  3. Paste the value into the input area.
  4. Read or copy the formatted output. If parsing fails, correct the reported syntax problem in the original value and try again.

The formatter also has separate modes for JavaScript, CSS, HTML, and PHP. Those modes improve readability; they are not a substitute for a language parser, linter, or production formatter.

What valid JSON requires

JSON has a deliberately small syntax:

  • Object keys must be wrapped in double quotes.
  • Strings use double quotes, not single quotes.
  • Arrays and objects cannot end with a trailing comma.
  • Values can be strings, numbers, objects, arrays, true, false, or null.

For example, this is valid:

{ "project": "EveryTask", "active": true, "members": 3 }

This is not valid JSON because the key and string use single quotes and there is a trailing comma:

{ 'project': 'EveryTask', }

Formatting, parsing, and schema validation are different

Formatting changes whitespace so a person can read the value. Parsing checks whether the characters form valid JSON. Schema validation checks whether valid JSON has the shape your application expects—for example, whether members is a number and whether a required project key exists.

The EveryTask formatter parses and formats JSON. Use your application schema, API contract, or a dedicated validator when you need to enforce field names, types, ranges, or business rules.

Common JSON errors

Unexpected token. Usually a missing quote, comma, bracket, or brace. Start at the location reported by the parser, then look just before it.

Trailing comma. JavaScript allows trailing commas in many places; JSON does not.

Unescaped quote or newline in a string. Use \" for a quote inside a JSON string and \n for a line break.

Pasting a JavaScript object. A JavaScript object can contain comments, unquoted keys, functions, or undefined; JSON cannot.

Safely inspecting data

Do not paste production secrets, access tokens, passwords, or customer records into any browser tool unless you have confirmed it is appropriate for your organisation. Formatting makes content easier to read; it does not remove sensitive values.

For converting data formats, use the separate JSON, YAML, and XML converter. For encoded strings, use the Base64 encoder and decoder.

Read a parser error efficiently

JSON parsers commonly report a character position or a line and column. Start there, then inspect the character immediately before the reported position. A missing comma or closing quote often causes the parser to complain later than the real mistake. Format the smallest reproducible fragment first; once it is valid, add surrounding fields back in.

Nested objects make bracket matching important. Indentation helps you see whether every { has a } and every [ has a ]. A formatter cannot guess a missing value or decide which of two possible structures your application intended, so use the API contract or schema as the source of truth.

JSON examples for common data

An object describes named values:

{ "name": "Ava", "active": true }

An array describes an ordered list:

{ "tasks": ["draft", "review", "send"] }

Values can nest, but keep the structure consistent. If an API expects an array of objects, sending a single object may still be valid JSON while being invalid for that API. That is why parsing and schema validation must be treated separately.

Safely share a JSON example

When asking for help, replace identifiers, tokens, email addresses, and customer data with representative placeholders. Include the smallest failing fragment, the expected shape, and the exact parser message. That gives another developer enough context to help without exposing production data.

Frequently asked questions

Can a formatter fix invalid JSON? It can reveal structure and parser errors, but it cannot know your intended missing values or keys.

Can JSON contain comments? Standard JSON cannot. Remove comments or use a format your tool explicitly supports.

Why is valid JSON rejected by my API? The syntax may be valid while the field names, types, or required values fail the API's schema.

Use formatting as a debugging aid

Once a value parses, formatting it makes nested objects and arrays easier to compare with an API example. Then validate its schema separately: valid syntax does not prove that required keys, data types, and business rules are correct.

Preserve a known-good sample

When an integration works, save a redacted valid example and its expected schema. It gives you a fast comparison point when later payloads fail and reduces the temptation to debug from memory.

Find the right next step

Explore EveryTask’s browser tools and document workflows.

Browse tools

Keep reading

All posts