Format, minify and cost-analyse GraphQL queries and fragments.
Tip: use samples, upload, copy, download, and send-to actions inside the workspace where available.
GraphQL Query Formatter is a free, browser-based tool that helps you catch errors before they reach production. Format, minify and cost-analyse GraphQL queries and fragments. It's built for speed and privacy: Everything runs locally in your browser — your data is never uploaded to a server. No sign-up, no installs, and no daily limits.
Validate the raw input first so syntax or structure errors are caught before downstream tools touch it.
Review the preview, copy or download the result, and keep everything local in your browser.
API Request Builder: Build an HTTP request visually, then export it as curl, fetch, axios, Python or Go.
Open toolOpenAPI Explorer: Browse an OpenAPI or Swagger spec — operations, schemas and ready-made curl.
Open toolAPI Response Inspector: Inspect a response's shape, status, caching and rate-limit signals.
Open toolquery GetOrder($id: ID!, $first: Int = 10) {
order(id: $id) {
id
total
status
customer {
...CustomerFields
}
lineItems(first: $first) {
edges {
node {
sku
quantity
unitPrice
}
}
}
}
}
fragment CustomerFields on Customer {
id
name
email
address {
city
country
}
}
query GetOrder($id:ID!$first:Int=10){order(id:$id){id total status customer{...CustomerFields}lineItems(first:$first){edges{node{sku quantity unitPrice}}}}}fragment CustomerFields on Customer{id name email address{city country}}Minifying strips comments and whitespace only. It never renames fields or aliases, so the response shape is byte-for-byte identical — worth doing for queries sent over the wire on every page load.
This parses syntax, not your schema. Without the server’s type definitions it cannot know whether a field exists or a variable type is right — only that the document is well-formed and internally consistent. A query that passes here can still fail validation.
Depth and breadth are the whole cost story. A single query can ask for a Cartesian product of your database. Production servers should cap query depth, enforce a complexity budget, and use persisted queries so arbitrary documents cannot be submitted at all.
Errors arrive with HTTP 200. GraphQL reports failures in an errors array alongside partial data. A client that only checks the status code will treat a failed query as a success.