GraphQL Query Formatter
Cmd/Ctrl+Enter saves this query to history.
Advertisement
Paste a GraphQL query, mutation, subscription, or fragment and get it consistently indented by brace depth. This formats syntax only — field names, arguments, and directives aren't checked against any schema, so a query that's wrong for your API will still format cleanly.
Frequently asked questions
- Does it validate my GraphQL query against a schema?
- No — this is a pretty-printer, not a validator. It re-indents by brace depth and doesn't check field names, types, or arguments against any schema, so it will format a query that would fail at your GraphQL server.
- Does it handle directives and block string arguments?
- Yes — @directive(arg: value) syntax and triple-quoted """ block strings (used for multi-line description arguments) are both recognized during formatting.
- What happens if my braces or parentheses are unbalanced?
- It returns an explicit error identifying which one is unbalanced, rather than silently producing malformed output.
- Is my query uploaded anywhere?
- No. Formatting happens locally in your browser tab — nothing is sent to a server.
Read the full guide for this tool →
Advertisement