GraphQL formatter

Client

Indent GraphQL queries and mutations for readability—pair with JSON → GraphQL SDL when you need schema drafts from sample data.

About GraphQL formatter

Format GraphQL queries and mutations with readable indentation—paste one line, copy structured text locally. The interactive transform on this page runs in your browser tab—Toolcore does not need your paste for the core operation described above.

How to use this page

Paste or type in the main workspace, run the primary action from the toolbar, then copy or download the result. Use Load example when the page offers it, or URL prefill (?q= / ?qb=) so agents and tickets open the same input.

Best-effort indentation for queries and mutations—validate against your API before shipping. For JSON API drafts, use JSON → GraphQL SDL instead.

Nearby workflows on Toolcore

  • JSON → GraphQL SDLDraft GraphQL object types from sample JSON—inferred fields, local only. when headers, identifiers, or reference tables need a sibling check.
  • JSON formatterJSON format online: pretty-print, minify, validate, escape, download . when headers, identifiers, or reference tables need a sibling check.
  • JSONPath & JMESPathQuery large JSON with JSONPath or JMESPath—results panel, runs in your tab. when headers, identifiers, or reference tables need a sibling check.
  • HTTP methodsGET, POST, PUT, PATCH, DELETE—safe, idempotent, body usage—quick reference for APIs, client-side. when headers, identifiers, or reference tables need a sibling check.

Common use cases

  • Pretty-print a minified GraphQL query from network devtools.
  • Format mutation payloads before pasting into API docs.
  • Clean up generated queries before sharing in chat.

Common mistakes to avoid

  • Treating output as validation

    This is a layout helper—it does not verify schema types or field names against your API.

  • Confusing with SDL generation

    JSON → GraphQL SDL builds types from sample JSON; this tool formats query text only.

FAQ

Does this run GraphQL?

No. It only reformats query text in your browser.

Are variables preserved?

Yes—argument lists and quoted strings are kept while braces are indented.

Can I format subscriptions?

Yes—subscription operations use the same brace-based layout rules.

Related utilities you can open in another tab—mostly client-side.