GraphQL Formatter
Pretty-print GraphQL queries, mutations, and SDL using the official graphql/language parser.
Loading GraphQL parser...
How to use
- 1 Paste a GraphQL query, mutation, subscription, or SDL.
- 2 Beautify reformats with the official <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">graphql/language</code> printer.
- 3 Minify strips whitespace and comments for compact transport.
- 4 Parse errors include the line and column.
Why use this tool
- Powered by the official <code class="rounded bg-slate-100 px-1 text-xs dark:bg-slate-800">graphql/language</code> parse and print functions — output is canonical SDL.
- Loaded on demand — the parser only downloads when you start typing.
- Both directions — beautify for repo, minify for transport.
- Pure client-side — your query never leaves the browser.
Frequently asked questions
Does this support GraphQL SDL (schema)?
Yes — SDL (Schema Definition Language) is parsed and printed identically. Use it to format full schemas including types, directives, and unions.
Why does the first format take a second?
The GraphQL parser library loads lazily on first input. Subsequent formats are instant.
Will fragments and variables be reordered?
No — the printer preserves your declaration order. Only whitespace and comma layout change.
GraphQL Formatter is a free developer utility by Zerethon Tools. Pretty-print GraphQL queries, mutations, and SDL using the official graphql/language parser. Runs entirely in the browser — no signup, no upload.
- Category
- Developer
- Pricing
- Free
- Privacy
- Browser-based
- Signup
- Not required
Privacy
Your data never leaves your browser unless explicitly stated. GraphQL Formatter runs entirely client-side — no server upload, no logging, no tracking of your input.
Related tools
JSON Formatter
Format, validate, and minify JSON online. Free, no signup — your data never leaves your browser.
Open toolSQL Formatter
Format SQL queries online — beautify MySQL, PostgreSQL, SQLite, SQL Server, Oracle, and BigQuery.
Open toolUUID Generator
Generate UUIDs online — v1, v4, v7, and Nil. Bulk generation up to 10,000. Free, no signup.
Open toolPassword Generator
Generate strong, cryptographically random passwords. Configurable length and character sets — runs in your browser.
Open toolBuild, share, and grow on Zerethon Social
Free signup. Earn points, collect achievements, and connect with creators worldwide.