Paste a GraphQL query, mutation or schema and get it properly indented, or minified down to a single line. Syntax is checked as you type, with the line and column of the first problem and a specific reason. Two things it gets right that matter: commas are dropped, because GraphQL treats them as whitespace rather than separators and idiomatic GraphQL does not use them — keeping them produces output nobody would have written by hand. And block string descriptions, the triple-quoted ones in a schema, are emitted exactly as written, because they routinely contain braces and line breaks that a reflowing formatter would destroy along with the documentation. Arguments stay on one line rather than sprawling, and declarations like `query GetUser($id: ID!)` are kept intact. It also shows the field count and nesting depth, which is a quick way to spot a query that is deeper than you meant.
| Detail | Behaviour |
|---|---|
| Commas | Whitespace per spec — dropped |
| """descriptions""" | Emitted verbatim |
| Braces inside strings | Not counted as structure |
| query Name($v: T!) | Kept on one line |
| fragment F on Type | Kept on one line |
| field(a: 1 b: 2) | Arguments stay inline |
| Schema validation | Not done — needs your schema |
No. It is tokenised and reprinted in your browser. Queries often embed IDs and tokens, so nothing is transmitted.
Because GraphQL defines commas as insignificant whitespace, not separators. They are legal but idiomatic GraphQL omits them, so the output matches what you would see in real schemas and documentation.
No. It checks syntax — that the brackets balance and the document is structurally sound. Whether a field exists or an argument has the right type requires the schema itself, which is a different and much larger job.
No. Triple-quoted block strings are emitted exactly as written. Their line breaks and indentation are part of the documentation, and reflowing them would damage it.
Because that is the convention, and because breaking them makes a field with three arguments sprawl over five lines for no benefit. Nesting comes from selection sets, which is what the indentation shows.
How many selection sets deep the query nests. It is worth watching — many servers impose a depth limit to prevent expensive queries, and a deeply nested query is often accidental.
The document is tokenised and reprinted, rather than parsed into an abstract syntax tree by the reference implementation — which is several hundred kilobytes to ship for what is, at this level, a tokenizer and a printer. Two details of the GraphQL grammar drive the design. Commas are insignificant: the specification defines them as whitespace, not separators, so they are discarded rather than preserved, because keeping them would produce output that does not look like the GraphQL anyone writes. And block strings delimited by triple quotes are captured whole and emitted verbatim, because they are how descriptions are written in a schema and routinely contain braces, quotes and line breaks that would otherwise be read as structure — a formatter that reflows them corrupts the documentation it was asked to tidy. Printing indents on braces only; arguments inside parentheses stay on one line, which is how GraphQL is conventionally written and keeps a field with three arguments from sprawling over five lines. Declarations outside any selection set are kept on a single line, so `query GetUser($id: ID!)`, `fragment Fields on User` and `type Thing implements Node` each stay intact rather than breaking after the keyword. Syntax checking reports the first bracket problem with a line and column — unclosed, unopened, or a mismatched pair — and correctly ignores brackets that appear inside strings and block strings. It is a syntax check, not schema validation: it can tell you the braces do not balance, not whether the field you asked for exists, which requires the schema itself. Everything runs in your browser.