GraphQL Formatter
Paste a minified or messy GraphQL query and get clean, readable output. Fields go on their own lines, arguments stay inline when they fit, and long argument lists break one per line. Comments are preserved, and errors report the exact line and column. Everything runs in your browser.
Input
Output
Formatted output will appear hereReady. Press Format or Minify.
How to use the GraphQL Formatter
- Paste a GraphQL query, mutation, subscription, or fragment into the input pane.
- Pick an indentation style and press Format, or Minify for a single line.
- Copy the result or download it as a .graphql file.
Example
A single-line query that expands into nested blocks.
{ fabric(code:"CN17300") { code mill pricing { tier garments { suit dressPants } } inventory { stock stores { storeId hanger } } } }Frequently asked questions
Can it format a schema?
Not yet. This tool formats executable documents: queries, mutations, subscriptions, and fragments. Pasting a type, interface, or enum definition reports that schema definitions are not supported.
Are my queries uploaded?
No. Formatting runs in your browser tab and the input is never sent anywhere.
What happens to comments?
Comments on their own lines are kept, attached to the field or definition that follows them.