JSON Formatter, Validator & Repair
Free online JSON formatter, JSON beautifier, JSON viewer, and JSON validator. Format JSON, inspect a JSON file, and fix broken payloads in your browser — nothing is uploaded.
Tool input stays in your browserDid you know · Tooling
A Unix crontab line has five fields; a sixth field on the left is seconds and is not portable across every cron daemon.
Input
you edit0 lines · 0 BOutput
read only0 lines · 0 BJSONPath
—Paste valid JSON or run Format so JSONPath has a document to query.
What is JSON
People search what is JSON because the acronym shows up in every API tutorial and error log. JSON means JavaScript Object Notation: a compact, language-neutral way to write structured data as plain text. A JSON value is an object, an array, a string, a number, a boolean, or null. Nested objects and lists describe records, carts, configs, and webhook bodies without inventing a new file type for each product. This JSON formatter exists so you can read that text instead of squinting at one long line.
What is a JSON file
What is a JSON file is the same idea saved on disk. A JSON file is almost always a .json document: package manifests, OpenAPI snippets, fixture data, browser exports, and infrastructure templates. The bytes are UTF-8 text in a JSON format a parser can load. Opening a JSON file in a code editor works; opening a minified dump in email or Slack does not. Paste the contents here to format JSON, then copy or download the result. Nothing in this JSON viewer writes your file to a server.
JSON syntax and square brackets
JSON syntax is small and strict. Objects use curly braces and "key": value pairs. Arrays use JSON syntax square brackets— [1, 2, 3] or a list of objects. Strings need double quotes. There are no comments in standard JSON. A trailing comma after the last property is invalid. Square brackets and braces must nest and close in order; a missing ] is one of the most common paste errors. This page indents those brackets so the tree is obvious, and the JSON validator names the line and column when a bracket or quote is wrong.
Format JSON with this JSON formatter
To format JSON, paste into the editor and run Format. The JSON formatter pretty-prints with two or four spaces or tabs and can sort object keys so two payloads compare cleanly. Minify is the inverse: it keeps valid JSON and strips insignificant whitespace for a query string, a header, or a size-sensitive config. The same surface is a JSON beautifier when the input is legal but unreadable, and a repair tool when logs escaped every quote. Use this JSON formatter when an API response, a support ticket, or a database column is technically JSON and still unusable in review.
JSON beautifier, JSON viewer, and JSON validator
A JSON beautifier only helps if the document already parses. This JSON viewer shows formatted output in a pane you can copy, so you are not relying on a collapsed tree in DevTools. The JSON validator runs on the same paste: if the text is not JSON, you get a precise error instead of a generic failure. Together they cover the usual search: json formatter, json beautifier, json viewer, json validator, format json, json format, and json file inspection — one client-side page rather than five sites that upload payloads.
JSONPath without a round-trip
After the document parses, JSONPath pulls nested values without writing a script. Expressions start with $. Dot names, quoted keys, indexes, slices, [*], and recursive descent ($..slug) are supported. Filter expressions are omitted on purpose so evaluation stays a tree walk in this tab, not a script eval. Matches copy as a JSON array.
Fixing broken JSON from logs
JSON pulled from logs, exception traces, or a column often arrives damaged: quotes escaped as \"key\", a missing opening brace, or a double-encoded string. Fix & Format unescapes quotes, newlines, and tabs; unwraps JSON stored as a string; re-escapes quotes that closed a string too early; strips illegal escapes such as \= in signed URLs; adds missing braces and square brackets; removes trailing commas and JavaScript comments; converts single quotes and unquoted keys; rewrites None, True, and NaN; and can join newline-delimited log lines into one array. Every change is listed. A repair is kept only when the result is valid JSON.
Why this JSON formatter stays in the browser
Format, beautify, view, and validate all run as JavaScript in this tab. Open DevTools, switch to Network, and format JSON: no request carries your JSON. That matters when a JSON file holds tokens, customer records, or internal ids. Other utilities (diff, delimiter, Base64, JWT, and the rest) are one green All utilities click away. The home page is this JSON formatter because that is the job most people came to do.
Read About Us, the Privacy Policy, Terms & Conditions, or Support.
JSON formatter FAQ
Short answers to the questions people type when they need a JSON formatter, a JSON beautifier, or help opening a JSON file.
What is a JSON formatter?
A JSON formatter is a tool that takes compact or messy JSON and reprints it with consistent indentation so objects, arrays, and keys are easy to read. This JSON formatter also validates syntax, minifies when you need a single line, and can repair JSON copied from logs. Everything runs in your browser; the payload is not uploaded.
How do I format a JSON file?
Open the JSON file in a text editor, copy its contents, and paste them into this JSON formatter, then choose Format. You can also use Open file on this page. The JSON beautifier re-indents curly braces and square brackets. If the file is invalid, the JSON validator reports the line and column so you can fix it, then format JSON again.
What is JSON beautify?
JSON beautify (or a JSON beautifier) means pretty-printing: adding line breaks and indentation without changing the data. Beautify is what Format does here when the input already parses. It is the opposite of minify, which removes extra whitespace. Beautify does not fix invalid JSON; use Fix & Format when quotes or brackets are broken.
Which JSON formatter is the best?
The best JSON formatter for private API data is one that never sends your JSON file to a server, shows validator errors with line numbers, and can repair escaped log paste. This page is built for that: format JSON, view it, validate it, and beautify it locally. Prefer a formatter that matches your editor’s indent (spaces or tabs) and that you can keep open without an account.
What is a JSON file?
A JSON file is a document that stores JSON text, almost always with a .json extension. Apps use a JSON file for config, fixtures, package manifests, and API samples so any language can parse the same JSON format. The file is plain UTF-8 text, not a binary spreadsheet. Paste it here to format JSON or use this page as a JSON viewer.
What is JSON?
JSON (JavaScript Object Notation) is a text format for structured data. Objects use curly braces and key/value pairs; arrays use square brackets. Values are strings, numbers, booleans, null, nested objects, or nested arrays. JSON is language-neutral and is the usual body format for REST APIs. This JSON formatter exists to make that text readable and to validate JSON syntax.
What is the difference between XML and JSON?
XML describes data with named tags and optional attributes; JSON describes data with objects, arrays, and quoted keys. JSON is typically shorter, maps cleanly to maps and lists in code, and does not use a closing tag for every field. XML can be more explicit about mixed content and schemas in some document workflows. APIs today usually speak JSON; you would convert XML separately rather than in this JSON formatter.
How to open a JSON file?
A JSON file is text, so you can open it in VS Code, Notepad, TextEdit, or any editor, or preview it in a browser. For a minified dump, opening it in an editor still shows one long line — paste into this JSON formatter or JSON viewer to indent it. On this page, use Open file to load a .json file from disk; it is read only in this tab.
What is a .json file?
A .json file is a JSON file whose name ends in the .json extension so operating systems and editors treat it as JSON. The extension does not change the format: the contents must still be valid JSON (braces, square brackets, quoted keys). If someone emails a .json file, save it, open it as text, and format JSON here if it is minified or hard to read.
Can I query JSON with JSONPath?
Yes. After the document parses (Format, or paste already-valid JSON), enter a JSONPath starting with $. Supported steps are names, numeric indexes, slices, wildcards, and recursive descent such as $..slug. Filters and script expressions are not evaluated. Matches stay in this tab with the rest of the JSON formatter.
Is this JSON formatter private?
Yes. Format, beautify, validate, repair, and JSONPath all run as JavaScript in this tab. Open the Network panel and paste a payload: no request carries your JSON.