GraphQL
Paste minified or unformatted GraphQL below.
Paste a minified or messy GraphQL query, mutation or fragment and get back clean, consistently indented code. The formatter handles arguments, directives, fragments and nested selection sets, and everything runs locally in your browser.
Paste minified or unformatted GraphQL below.
The formatter tokenizes your GraphQL into braces, parentheses, arguments and strings, then rebuilds it with two-space indentation. Opening braces start a new indent level, arguments stay on one line like user(id: 1), and quoted strings are never touched, so the query keeps working exactly as before.
Formatted queries are easier to debug in GraphiQL or Apollo Studio, simpler to review in pull requests, and cleaner to paste into documentation. Consistent indentation also makes diffs readable when an API query changes between app versions.