GraphQL Formatter
runs in your browserno sign-upfree
Format GraphQL queries, mutations, fragments and schema (SDL) into clean, indented code.
Formatting…
Input224 chars
Output
About this tool
This GraphQL formatter turns one-line or messy GraphQL into clean, indented queries, mutations, fragments and schema definitions (SDL). Paste GraphQL, choose the indent and copy the readable result.
How to use
- Paste your GraphQL query or schema into the Input box. It is formatted as you type.
- Choose the indent and maximum line width.
- Copy the formatted GraphQL or download it as a .graphql file.
FAQ
Which formatter is used?
Prettier, the most widely used code formatter for web projects. It runs entirely in your browser, so your code is never uploaded.
Does it check my query against a schema?
No. It checks the GraphQL syntax and formats it, but does not know which fields your API has.
What happens if my code has a syntax error?
The status line shows the problem with its line and column, and the error is marked in the editor. Fix it and the formatted result appears straight away.