GraphQL Formatter
Format or minify a GraphQL query, mutation or schema, and inspect its depth.
A GraphQL formatter indents a query, mutation or schema so its selection sets are readable, or minifies it by stripping every optional space. Because it tokenises rather than pattern-matching, braces inside string literals and comments cannot corrupt the indentation.
Runs in your browser- Privacy
- Runs entirely in your browser — nothing is uploaded
- Cost
- Free, unlimited, no sign-up
Frequently asked questions
Does formatting change how a query executes?
Why do servers limit query depth?
How to use the graphql formatter
- 1Enter or paste your graphql.
- 2Choose the mode.
- 3Set the indent.
- 4The result appears immediately — copy or download it.
Embed this tool
Put the working graphql formatter on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.
Share this tool
Related tools
Sample API Response GeneratorGenerate realistic REST, JSON:API, GraphQL and error-envelope responses with pagination.API Request BuilderBuild an HTTP request visually and get it as curl, fetch, axios, Python, Go or PHP code.HTTP Status Code ReferenceLook up what any HTTP status code means and when to use it.JSON Schema GeneratorInfer a JSON Schema from example data, detecting types, string formats and required keys.SQL IN Clause BuilderTurn a pasted column of values into a safely quoted SQL IN clause, batched if needed.URL BuilderCompose a URL from its parts with correctly percent-encoded query parameters.
Last updated
More developer tools