● runs entirely in your browser

GraphQL Query Formatter & Validator

Paste a GraphQL query, mutation, or fragment for a syntax sanity check (balanced braces/parens) and clean, consistently indented formatting. Nothing is ever uploaded.

How it works

A custom tokenizer splits the query into names, punctuation, strings (including triple-quoted block strings), and spreads (...), then a bracket-matching pass over the punctuation tokens confirms every brace, paren, and bracket is closed before reformatting re-indents the query one field per line, based on selection-set depth.

FAQ

Does this validate that my GraphQL query is fully correct?
No — it only checks that braces, parentheses, and brackets are balanced; it doesn't know your schema, so a well-balanced query with an invalid field name or type will still format cleanly without any error.
How does it treat comments starting with #?
It strips them — the tokenizer skips everything from a # to the end of that line, so any comments in your input won't appear in the formatted output.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks — $3