Fix JSON Online
Repair invalid JSON locally, then format it with clean indentation. Handles common mistakes from logs, APIs, and LLM output.
Related
Guides for JSON Fix
JSON Parse Errors: Read the Message, Jump to the Fix
A directory of JSON parser error messages and the article that explains each one — start with a strict validator, then drill into the specific syntax problem.
Fix Trailing Comma in JSON
A trailing comma after the last object property or array item is valid in some JavaScript contexts, but it is not valid JSON.
Fix Single Quotes in JSON
JSON strings and object keys must use double quotes. Single-quoted values are common in JavaScript snippets, Python-like output, and LLM responses.
Smart JSON Formatter for broken JSON
A regular JSON formatter only works after the input is already valid. fixjson.org is a JSON formatter with auto fix: it repairs common syntax errors first, then formats the cleaned JSON with readable indentation. Use it to format invalid JSON online when the payload came from logs, an API response, a hand-edited config, or AI output.
The same tool is also a json beautifier, json prettifier, json tidy online, json decoder, and json object formatter — different names for one operation: parse, repair, and re-emit with indentation. Whether you call it prettify json, json beautify, code formatter, or code beautification, the output is the same: strict, formatted JSON in the standard json file format.
Formatting and validation belong together. Before it prints anything, fixjson runs a json validator over your text, so the tool doubles as a json checker and a json verify step — if the json syntax is wrong, you see exactly where it breaks. Paste a raw json string, fix json that refuses to parse, and read the result in a clean json viewer (jsonviewer) layout. The same site links a json object viewer and a json view mode for inspecting nested key value pairs, instead of scanning one long unbroken line.
When the parse fails, the repair step takes over. This is the json repair path people search for as fix json, json fix, json correct, correct json, or simply fixjson. It rewrites the broken parts into valid JSON and hands them back, turning a failed json validator run into a clean one — no upload, no account.
Most of these errors come from treating JSON like JavaScript. The json vs javascript (json vs js) distinction matters: JSON has no comments, no trailing commas, no single quotes, and no bare keys. The repair step rewrites each of these back into correct json so a strict parser accepts it.
- Single quotes — converts
'value'to"value" - Missing quotes in JSON keys — wraps bare identifiers like
{ name: "Ada" }in double quotes - Trailing commas — repairs trailing commas in JSON before
}or] - Unexpected token errors — cleans the common json syntax mistakes behind many JSON parser failures
- Python literals — replaces
True,False,Nonewith their JSON equivalents - JavaScript comments — strips
//line comments and/* */block comments - Markdown code fences — strips leading ````json` and trailing ````` wrappers from LLM output
- Hex numbers — converts
0xFFto decimal
JSON repair guides
Topic hubs
- JSON Parse Errors: Read the Message, Jump to the Fix
- Fix Invalid JSON: From 'What's Wrong' to a Clean File
- JSON Formatter, Validator, Viewer: Pick the Right Tool
- Repair LLM JSON Output: Handling Almost-JSON from AI
- Privacy: JSON Tools That Don't Leave Your Browser
- JSON Interop: YAML, CSV, XML, JWT, Schema
Specific guides
- How to Decode Base64 Strings (and JWT Payloads)
- URL Encoding: Percent-Encode Query Parameters and Paths
- Convert YAML to JSON (and Avoid Indentation Errors)
- Convert JSON to CSV: Flatten an Array of Objects
- Convert JSON to XML: Root Elements, Attributes, and Arrays
- Escape JSON as a String Literal (and Decode Double-Encoded JSON)
- Fix Trailing Comma in JSON
- Fix Single Quotes in JSON
- Fix Unquoted Keys in JSON
- Repair LLM JSON Output
- Fix JSON Parse Error: Expected Property Name
- JSON vs JS Object Literal: The Key Differences
- Validate JSON Before API Requests
- JSON Formatter vs JSON Repair
- Fix JSON Unexpected Token Errors
- JSON to JavaScript Object Converter