All tools

GraphQL Formatter

Code

Format and minify GraphQL queries and mutations

Paste a minified GraphQL query copied out of a browser's Network tab or DevTools and get it reformatted with proper indentation around braces and arguments, or minify a formatted query and mutation before embedding it as a string literal in application code. It's built to reformat structure it recognizes (queries, mutations, fragments, variables) rather than to fully parse and validate GraphQL grammar the way a real GraphQL parser would, so it's a formatting and readability tool, not a schema validator; a query that's subtly malformed can still come back reformatted without an error being raised. For catching a genuine syntax mistake or checking a query against your actual schema, your GraphQL client's own validation or the GraphQL server itself is the more reliable check. Formatting runs entirely client-side.

graphqlgqlformatminify

How to use GraphQL Formatter

  • 1.Paste a minified GraphQL query copied from browser DevTools network tab to get readable, indented output for debugging.
  • 2.Minify a formatted query or mutation before embedding it as a string literal in application code to reduce payload size.
  • 3.Format a complex query with nested fragments to double-check the structure matches what you intended before sending it to an API.

Frequently asked questions

Does this validate my query against a schema?
No, it only formats and checks GraphQL syntax validity — it doesn't know your schema, so it won't catch a query field that doesn't actually exist on your API.
Is my query sent to a server?
No, formatting happens entirely client-side in your browser.
Does it support mutations and subscriptions, not just queries?
Yes, all three GraphQL operation types (query, mutation, subscription) are formatted the same way.
Does it handle fragments and variables?
Yes, fragment definitions, spreads, and variable declarations are parsed and formatted correctly as part of the standard GraphQL grammar.

Use via API, SDK, or MCP

cURL# Free: 1,000 req/day · Pro: 10,000 req/day
curl -X POST https://api.utilix.tech/v1/tools/graphql-format \
  -H "Authorization: Bearer utx_live_..." \
  -H "Content-Type: application/json" \
  -d '{"input": "query{user(id:\"1\"){name email}}"}'

Get an API key from your dashboard · Full API docs →