Skip to content
UtilPick.
My toolbox
All tools
Favorites
Saved tools

Loading…

Recently used

Tools you open will appear here.

Get the desktop app
Settings
UtilPick.
All tools
All tools/JSON Formatter

JSON Formatter

Pretty-print or minify JSON, see errors by line and column, and auto-fix trailing commas or single quotes. Nothing you enter is sent to a server.

Indent
01

Input

0 / 100,000 characters

Fixes only comments, single quotes, unquoted keys and trailing commas. Your input stays as is; only the result changes.

⌘ / Ctrl + Enter
02

Result

Your result will appear here

Format JSON to inspect its structure and save it as a file.

Not run yet

User reviews

No reviews yet. If you’ve used this tool, be the first to leave one.

User reviews

No reviews yet.

Write a review

Checking your sign-in status…

    From first step to finished result

    JSON Formatter: complete guide

    Walk through the steps and examples, or jump straight to the topic you need.

    How to use
    Examples & choices
    Troubleshooting
    FAQ

    At a glance

    Supported syntax
    Standard JSON. Besides objects and arrays, strings, numbers, true, false, and null are handled when they are valid JSON values.
    Actions
    2-space, 4-space, and tab indentation, plus one-line minifying.
    Input limit
    Up to 100,000 characters; UTF-8 files up to 512 KB.
    Formatting limit
    Indented formatting supports up to 128 levels of nesting and 2 million characters of output.
    What is preserved
    Long numbers, key order, duplicate keys, and string escapes are left as they are; only structural whitespace is tidied.

    How to use JSON Formatter

    1. 01

      Enter the JSON text

      Paste the JSON part of an API response or config file. If you include markdown code block fences or a JavaScript variable declaration, it is not JSON syntax. You can also load a file when the source is empty.

    2. 02

      Choose whether to format for readability or minify

      To read the structure, choose formatting and an indentation. If you need data without line breaks, choose one-line minifying. Even when minified, whitespace and line break escapes inside string values are not removed.

    3. 03

      Run it and check the error or the result

      Run it with the convert button or Cmd/Ctrl+Enter. If an error appears, check the double quotes, trailing comma, and closing brackets. The original and the result are in separate areas so you can compare the changed whitespace.

    4. 04

      Copy or save as a JSON file

      Move the result to the editor or request tool you need. Changing the input or indentation invalidates the previous result, so run it again. Passing the syntax check does not mean the fields required by the target API are correct.

    What it’s good for

    JSON formatting and one-line minifying

    Paste an API response or a config file and choose the indentation. It supports 2-space, 4-space, and tab formatting, plus one-line minifying. Whitespace inside strings is kept; only the whitespace between structural elements changes. You can compare the result next to the original and save it as a JSON file.

    Syntax checking and preserving original values

    Invalid JSON gets an error message when you run it. Check the double quotes around property names, any comma after the last item, and closing brackets. Long numbers, key order, and escape notation inside strings are preserved exactly as written. A pass means the syntax is valid; it does not check against the JSON Schema of a particular API.

    Worked examples

    Format an object with 2-space indentation

    Input and settings
    {"name":"UtilPick","active":true}
    Result
    {
      "name": "UtilPick",
      "active": true
    }
    Keys and values stay the same; only line breaks and indentation are added to make the structure readable. Property names and strings must use double quotes.

    Preserve a long number and string whitespace

    Input and settings
    { "id": 9007199254740993, "label": "a  b" }
    Result
    {"id":9007199254740993,"label":"a  b"}
    This is a one-line minify example. The last digit of the long integer and the two spaces inside the string are kept. Keys are not sorted by name and the meaning of values is not changed.

    Choosing between formatting and minifying

    Swipe the table sideways to see the rest.

    Choosing between formatting and minifying
    MethodPurposeWhat is kept and limits
    2 or 4 spacesReading an API response or config structureOnly the indentation width changes; the original values and key order stay the same.
    TabEditing environments that use tab indentationThe tab width you see depends on your editor settings.
    One-line minifyMoving data without unnecessary structural whitespaceWhitespace inside strings is kept. Comments, single quotes, and trailing commas are fixed only when you press format after fixing them.

    When the result isn’t what you expected

    It says my copied response is not JSON

    The response may be an HTML error page, or explanatory text may be attached before or after the JSON. Keep only the actual JSON value. A JavaScript object containing single quotes, comments, or a trailing comma differs from standard JSON.

    Fixing near the error position still fails

    The error position can be near where the cause was first detected. Also look for a missing closing quote or bracket earlier in the text. This tool does not arbitrarily fix the syntax and change values, so edit the original and run it again.

    It says it is too deep or the result is too large

    When nesting is deep, indentation alone makes the output grow a lot. Format the needed parts separately, or choose one-line minifying. The input itself must also be within 100,000 characters.

    Key terms

    Indentation
    Putting spaces or tabs at the start of a line to show nested structure.
    Escape
    Writing quotes, line breaks, and similar characters inside a string with backslash notation.
    JSON Schema
    A set of rules describing the requirements of data, such as field names and types. This tool does not check against those rules.

    JSON Formatter FAQ

    Does it support JSON with comments or single quotes?

    It checks with standard JSON syntax and tells you where the error is. For comments, single-quoted strings, unquoted keys, and a comma before a closing bracket, press format after fixing them and it converts to standard JSON and tells you how many places were fixed. The original text is left as it is. Other JSON5 syntax is not supported.

    Are big numbers rounded or keys sorted?

    This formatter uses the original tokens to preserve number notation and key order. It does not reorder keys alphabetically or remove duplicate keys.

    Can it format large or deeply nested JSON?

    Input up to 100,000 characters is supported. Indented formatting is limited to 128 levels of nesting and 2 million characters of output, and if you exceed that, you are advised to split the JSON or use one-line minifying.

    Are duplicate keys merged into one?

    Duplicate keys are not removed or merged; they are kept in the original order. Other programs may read duplicate keys differently, so check any unintended duplicates in the original.

    Is a JSON file I load sent to a server?

    The file contents are read and formatted in the browser. It does not call an API from a server or use any feature that stores the original text in an account.

    Jump to a topic

    • #JSON formatter
    • #format JSON
    • #minify JSON
    • #JSON syntax error
    • #keep big numbers

    Reviewed 2026.09.08

    Related tools

    View all
    Base64 ConverterDeveloper
    URL Encode / DecodeDeveloper
    UUID GeneratorDeveloper
    UtilPick

    Simple tools for a complicated day. A free collection of online utilities.

    Service

    About UtilPick Get the desktop app

    Help

    Request a toolReport a problemContactinfo@utilpick.com

    Policies

    Privacy Policy (Korean)Terms of Use (Korean)
    Business registration no. 365-47-00936 (Republic of Korea)
    © 2026 UtilPick
    Featured on Twelve ToolsUtilPick - Featured on Startup FameFazier badgeFeatured on LaunchIgniter
    HomeSearchSavedMore