How to use it
- 1
Paste a GraphQL document.
- 2
Choose the indentation size and run the formatter.
- 3
Review the structure and copy the formatted document.
What the tool can do
- Operation definitions, variables, arguments, and directives.
- Selection sets, aliases, fragments, inline fragments, and type conditions.
- Comments, escaped strings, and triple-quoted block strings.
- Checks for matching braces, parentheses, and brackets.
Common use cases
- Preparing a query for a pull request or documentation.
- Reviewing a compact GraphQL payload copied from logs.
- Catching obviously unbalanced delimiters before debugging.
How it works inside
Input is limited to 500,000 characters, 20,000 tokens, and depth 64.
Commas are treated as insignificant GraphQL tokens and are not required in the output.
Questions and answers
Is the query checked against my schema?
No. Schema introspection and remote endpoint access are outside the formatter's scope.
Can it format fragments and block strings?
Yes. The formatter preserves fragment spreads, comments, regular strings, and triple-quoted strings within its bounded lexical parser.
