GraphQL Formatter
CodeFormat 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.
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
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 →