Prettify, minify, and validate JSON data instantly.
Free online JSON formatter and beautifier. Paste your JSON, choose 2- or 4-space indentation, and format with optional key sorting. Validates syntax with precise line and column error pointers. Minify JSON for production use, repair malformed JSON (trailing commas, single quotes, bare keys), generate TypeScript interfaces, or extract all dot-notation key paths. Runs entirely in your browser — no data is ever sent to a server.
Keywords: json formatter, json formatter online, json validator, json minifier, json beautifier, json lint, json repair, json to typescript, pretty print json, json online, format json online, json pretty print, json beautify, validate json online, json key paths, json typescript interface
Tags: json, format, prettify, validate, lint, minify
Paste your JSON into the input area on the left, or upload a .json file using the upload button.
Choose your indentation size — 2 spaces or 4 spaces — and optionally enable Sort Keys to alphabetically order object properties.
Click the Format button or press ⌘↵ (Mac) / Ctrl+Enter (Windows) to prettify your JSON with syntax highlighting.
Use Minify to collapse the JSON to a single line for production use, or Validate to check for syntax errors with precise line and column numbers.
Copy the formatted output with ⌘⇧C, download it as a .json file, or use the Share button to generate a gzip-compressed shareable URL.
JSON formatter with configurable indentation: 2 spaces or 4 spaces to match your team's style guide.
Sort Keys option: alphabetically reorders all object keys for consistent, diff-friendly output.
JSON validator with precise error reporting — shows the exact line number and column of the syntax error.
JSON minifier: collapses formatted JSON to a single line, removing all unnecessary whitespace for production use.
JSON Repair: automatically fixes common JSON errors including trailing commas, single-quoted strings, bare (unquoted) keys, missing colons, and missing commas.
TypeScript type generator: infers TypeScript interface definitions from any valid JSON document.
Key Path extractor: lists all dot-notation key paths in the JSON, useful for writing JSONPath or jq queries.
Syntax highlighting with color-coded strings, numbers, booleans, null values, and keys.
Large-input warning with byte count — alerts you when the input may slow down formatting.
Shareable URLs: gzip-compresses your JSON into a URL parameter so you can share documents with teammates.
Works entirely in your browser — no JSON is ever sent to any server. Your data stays completely private.
Keyboard shortcuts for power users: ⌘⇧F to format, ⌘⇧M to minify, ⌘⇧V to validate, ⌘⇧K to clear.