Online Tool Store Online Tool Store

GraphQL Formatter

Paste a minified or unevenly indented GraphQL query, mutation, or schema and get cleanly formatted output back. Runs entirely in your browser.

🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.

Formatted

Type or paste a query above — it formats live.

How the GraphQL Formatter works

  1. Paste a minified or unevenly indented GraphQL query, mutation, or fragment — a sample query loads automatically.
  2. The formatter tokenizes the document and reprints it with two-space indentation, one field per line.
  3. Copy the formatted result with one click.

The method

Every selection set (each pair of curly braces) starts a new indent level, and every field, spread, or directive on that level gets its own line — but argument lists in parentheses stay inline, since that's how most GraphQL style guides format them.

Invalid GraphQL syntax (an unrecognized character) is reported as an error rather than silently producing broken output.

FAQ

Does this tool upload my data?

No. Tokenizing and reformatting happen entirely in your browser — nothing is sent to a server.

Does it validate my query against a schema?

No. It only checks that the text is well-formed enough to tokenize (matching braces, valid tokens) — it doesn't know your schema, so it can't catch a typo'd field name or a type mismatch.

Does it work on mutations and fragments too?

Yes — the formatter works on any GraphQL document (queries, mutations, subscriptions, and fragment definitions), not just the sample query shown.

What happens if I paste invalid GraphQL?

An error message names the unexpected character and its position, instead of showing malformed output.

How we compare

FeatureOnline Tool StoreIDE GraphQL pluginManual reformatting
No install or extension
Instant, live as you type
Works on any document, not just files open in an editor

For a quick reformat of a query copied from a bug report or API doc, this beats opening a full IDE just to run its GraphQL formatter.

Explore related tools

Embed this tool

Paste this on your own site — it stays free, and every file still stays in your visitor's browser, not yours or ours.