JSON Formatter
Validate, beautify or minify JSON and see exactly where it is invalid. Strict RFC 8259 JSON only.
Processed in your browser. Nothing you enter is uploaded.
Strict JSON (RFC 8259) only: comments, trailing commas, single quotes and unquoted keys are reported as errors, not repaired.
How to use it
- Paste your JSON.
- Choose Format or Minify and, for formatting, the indentation.
- Fix any error shown with its line and column.
- Copy the result or download it as a .json file.
Example
- Minify
- Input:{ "a": 1, "b": [1, 2] }
- Result:{"a":1,"b":[1,2]}
What does JSON Formatter do?
JSON Formatter validates, beautifies or minifies JSON and reports the line and column of any error.
How does JSON Formatter work?
A strict scanner finds and describes errors, and the browser's native JSON.parse and JSON.stringify produce the output. Everything runs in your browser.
Is my data uploaded?
No. Your JSON is processed in your browser and is never sent anywhere.
Which formats and inputs does JSON Formatter support?
Inputs: Strict JSON text (RFC 8259). Output: Formatted JSON with 2 spaces, 4 spaces or tabs, minified JSON, or an error with its position.
What are the limits and limitations of JSON Formatter?
Limits: maximum input 10,000,000 characters; tested with about 1 MB of JSON. Comments, trailing commas, single quotes and unquoted keys are errors, not repaired. Numbers that a JavaScript number cannot hold exactly trigger a precision warning.
More questions
Does it accept comments or trailing commas?
No. The input must be strict JSON, and anything else is reported as an error with its line and column.
Related tools
- Base64 Encode/DecodeEncode text to Base64 or decode Base64 back to text. Unicode-safe, with a URL-safe option.
- Unix Timestamp ConverterConvert Unix timestamps (seconds or milliseconds) to dates and dates back to timestamps.
- UUID GeneratorGenerate random version 4 UUIDs, one or up to 100 at a time, using your browser's secure random generator.