String-aware tokenizer
Braces and quotes inside string arguments are never mistaken for structure, so formatting stays accurate.
Paste a minified GraphQL query, mutation or subscription and get it re-indented with two spaces per depth level, plus a quick structural validity check.
Paste GraphQL on the left and press Format.
Formatting runs locally — nothing you paste is sent anywhere.
Braces and quotes inside string arguments are never mistaken for structure, so formatting stays accurate.
A mismatched brace, bracket or parenthesis is reported with its exact line and column.
Grab the formatted query instantly, ready to paste into your codebase or documentation.
Turn a minified or inconsistently indented operation into something reviewable in one step.
Rather than relying on a full GraphQL parser, this tool tokenizes the input character by character, tracking whether it is inside a string literal and how deep the current brace, bracket or parenthesis nesting is. That is enough information to safely re-indent real-world GraphQL without ever needing a schema.
Every time the tokenizer opens a brace, parenthesis or bracket, the indent level increases by one; closing one decreases it, so each line reflects exactly how nested it is.
Selection sets are split so each field, argument block or fragment spread gets its own line instead of being crammed together.
Quoted strings are tracked as a single unit, including escaped quotes, so their contents are never reformatted or misread as structure.
The same pass counts open and close tokens; the first one that does not have a matching partner is reported with its line and column.
Questions about validation, supported operations and privacy.
No. It performs structural validation only, checking that braces, parentheses and brackets are balanced and properly nested. It does not know your schema, so it cannot catch invalid field names or types.
Yes. The formatter re-indents any GraphQL operation, including query, mutation, subscription and fragment definitions, the same way.
The tool reports the line and column where it first detects an unmatched or misordered brace, bracket or parenthesis, so you can jump straight to the problem instead of scanning the whole query.
No. The tokenizer tracks string literals so that braces or quotes inside a string argument are never treated as structural characters, and the string contents are copied through unchanged.
No. Parsing and formatting run entirely in your browser with a hand-written tokenizer. Nothing you paste here is stored or transmitted.