GraphQL Formatter
Parse, format, or minify GraphQL operations and summarize variables and fragments
Uses the reference GraphQL parser for document syntax. No schema is connected, so fields, argument types, and authorization are not validated.
The syntax-valid GraphQL document will appear here.
About this tool
GraphQL Formatter uses the GraphQL reference parser and printer to validate and normalize executable documents. It handles query, mutation, subscription, fragment, directive, alias, variable-definition, and inline-fragment syntax. Format mode prints a canonical readable document; Minify mode removes ignored whitespace, commas, and comments while preserving GraphQL token boundaries. The result also summarizes operation names, types, variables, fragments, and total definitions, and syntax errors include line and column when supplied by the parser. No schema or endpoint is connected, so the tool cannot validate field names, argument types, fragment compatibility, deprecations, authorization, or execution behavior.
Scenario Recipes
Normalize a captured GraphQL operation for code review
Goal: Separate document syntax cleanup from schema and runtime debugging
- Paste the complete operation with all fragment definitions and format it.
- Review operation names, variable count, fragments, and any syntax location errors.
- Commit the normalized document, then validate it separately against the current schema and execute it in an authorized environment.
Result: A readable syntax-valid operation with schema and runtime checks kept explicit.
Frequently Asked Questions
Does it support mutations and subscriptions?
Yes. The reference parser accepts query, mutation, subscription, fragment, and directive syntax.
What does Minify remove?
It removes ignored whitespace, optional commas, and comments while preserving required token separation.
Will formatting preserve comments?
No. The GraphQL AST printer emits the semantic document and does not retain source comments.
Can it validate fields against my schema?
No. Without a schema it checks document syntax only, not field existence, arguments, or fragment type conditions.
Does it execute the GraphQL request?
No. It never contacts an endpoint, sends variables, or evaluates authorization.
Is the query uploaded?
No. Parsing, printing, minification, and summaries run locally.
Keep browsing