Free GraphQL Formatter
Beautify GraphQL queries, mutations, and schemas into clean, readable code. This formatter re-indents nested selection sets, normalizes spacing, and keeps arguments and directives tidy so long queries become easy to scan.
How to Use
Paste a GraphQL query or schema and click Format. Choose an indentation size and whether to collapse short argument lists. The formatted result can be copied straight into your editor or an API tool.
- Re-indents nested selection sets and braces
- Normalizes whitespace and commas
- Sorts each selection set alphabetically (optional)
- Adjustable indentation (2 spaces, 4 spaces, or tab)
What is GraphQL?
GraphQL is a query language for APIs that lets a client request exactly the fields it needs. A query is written as a set of nested selection sets surrounded by braces; this formatter walks that structure and re-emits it with consistent indentation, which makes complex queries with deep nesting far easier to review.
Related Developer Tools
You might also need
Tools from other categories that people pair with the GraphQL Formatter: