GraphQL Formatter
Format, validate and minify GraphQL queries, mutations and schemas with syntax errors pinpointed. Runs on your device.
No uploads
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
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.
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.
More tools
JSON Formatter & ValidatorPretty-print, minify, validate Base64 Encoder & DecoderText and files Hash GeneratorMD5, SHA-1, SHA-256, SHA-512 Password & UUID GeneratorStrong, random, local Regex TesterLive matches and groups JWT DecoderHeader, payload, expiry Diff CheckerCompare two texts CSV ↔ JSON ↔ YAML ↔ XMLConvert data formats