Developer Tools

GraphQL Query Formatter

Live

Format GraphQL operations with readable indentation.

About GraphQL Query Formatter

Format GraphQL operations with readable indentation. Enter graphql in a purpose-built graphql formatter interface designed for this subject. Tokens and braces are spaced and indented without sending or executing the query. The result includes formatted graphql, operation type, brace balance, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up GraphQL Query Formatter

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter graphql.

GraphQL Query Formatter result

Enter the values above, then process to see a detailed result.

How GraphQL Query Formatter works

Tokens and braces are spaced and indented without sending or executing the query.

How it works

Tokens and braces are spaced and indented without sending or executing the query. Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.

Examples

GraphQL Query Formatter worked example

Example input
{
    "source": "query Tool($slug:String!){tool(slug:$slug){name status inputs{key label}}}"
}
Expected result
{
    "formatted": "query Tool($slug:String!) {\n  tool(slug:$slug) {\n    name status inputs {\n      key label\n    }\n  }\n}",
    "operation_type": "query",
    "brace_balance": "Balanced"
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Frequently asked questions

How does the GraphQL Query Formatter work?

Tokens and braces are spaced and indented without sending or executing the query.

What information should I enter?

Enter graphql. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports formatted graphql, operation type, brace balance, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions, units, and rounding. Review important decisions against authoritative requirements.