About GraphQL Minifier
GraphQL is a query language for APIs in which the client lists the exact fields it wants. This tool splits your document into tokens and prints it again: formatting puts each field on its own line, indents by nesting depth, and keeps arguments on one line, while minifying removes comments, commas, and unneeded whitespace. It checks that braces and parentheses are balanced but does not validate field names against a schema.
How to use GraphQL Minifier
- Type or paste into the "GraphQL" box, or press "Use example" to try it with sample data.
- Set "Action" and "Indent" if the defaults do not fit.
- The result appears below and updates as you type.
- Copy the result with the copy button, or download it as a file where that is offered.
Questions about GraphQL Minifier
Are commas required in GraphQL?
No. The GraphQL specification treats commas as insignificant, like whitespace. They may appear between fields or arguments for readability, but removing them does not change the meaning, which is why the minifier drops them.
Runs in your browser. Page last updated .