GraphQL Formatter
Prettify or minify queries
Format, validate and minify GraphQL queries, mutations and schemas with syntax errors pinpointed. Runs on your device.
query GetUser($id: ID!, $first: Int = 10) {
user(id: $id) {
id
name
...Avatar
posts(first: $first) {
edges {
node {
id
title
createdAt
}
}
}
}
}
fragment Avatar on User {
avatar(size: 64) {
url
}
} ✓ Valid GraphQL · 1 operation, 1 fragment
GraphQL Formatter — Format, validate and minify GraphQL queries, mutations and schemas with syntax errors pinpointed. Runs on your device. Free on ToolWand: no sign-up, no watermark, works offline.
How to use GraphQL Formatter
- 1Open GraphQL Formatter. It runs in your browser, no sign-up.
- 2Type or paste your input.
- 3Copy or download the result.
About GraphQL Formatter
GraphQL Formatter prettifies, validates and minifies GraphQL queries, mutations and schemas with the reference graphql-js parser, and points to syntax errors.
When to use it
- Make a query from logs or network requests readable.
- Check a query’s syntax before sending it.
- Minify a query for a URL or embedded string.
Tips
- It checks syntax only, so no schema or endpoint is needed.
Questions
Does it validate against my schema?
It checks syntax only (queries, mutations, fragments and SDL schemas). No schema or endpoint is needed.
Is anything sent to a server?
No. Formatting uses the reference graphql-js parser in your browser.
What does minify do?
It strips whitespace, commas and comments that GraphQL ignores, keeping the query identical in meaning.