JSON-prettify

    JSON Formatter & Validator

    Format, validate, minify and repair JSON instantly, right in your browser.

    Input

    Output

    Your formatted JSON will appear here

    How to format JSON

    1. Paste JSON into the Input box, or upload or drop a .json file.
    2. Click Format to pretty-print it with 2-space indentation, or Minify to remove all whitespace.
    3. Read the result with syntax highlighting, or switch to Tree View. Use search to find keys and values.
    4. Copy the result or download it as a .json file.

    Frequently asked questions

    Is my JSON uploaded anywhere?

    No. Formatting, validation and repair run entirely in your browser, and your JSON is never sent to a server. Recent results are kept in your browser's local storage so you can reopen them from History; you can delete them at any time.

    What does "repaired" mean?

    If the input isn't valid JSON, the formatter fixes common mistakes: trailing commas, missing closing brackets, single quotes, unquoted keys, comments, and JavaScript values like undefined. It then shows the original error so you know what was wrong.

    Why is my JSON invalid?

    The error message usually points to where parsing failed. Common causes are a missing comma between values, a trailing comma, single quotes instead of double quotes, or an unescaped quote inside a string.

    Does formatting change my numbers?

    No. Numbers are kept exactly as written, including very large integers such as 64-bit IDs (which many tools silently round) and spellings like 1.0 or 1e3.

    What's the difference between Format and Minify?

    Format adds line breaks and indentation so JSON is easy to read. Minify removes all unnecessary whitespace to make it as small as possible, for example before sending it over a network.