Skip to content
Toolwright

GraphQL Formatter

GraphQL Formatter lays out GraphQL cleanly, with one field per line, long arguments split and comments kept, and can minify it again. It works for queries, mutations, fragments and schema definitions, and runs in your browser.

Tool 034 · Developer
Outside requests …How to checkRuns on this deviceWorks offline once opened

How to use GraphQL Formatter

  1. Paste a GraphQL query, mutation or schema, or open a .graphql file.
  2. Choose Format or Minify, and the indent.
  3. Copy the result.

Frequently asked questions

Does it check that my GraphQL is valid?

No. It checks that the text can be read (strings are closed, brackets match, nothing unexpected) and says which line is wrong if not. It does not check names or types against a schema.

What happens to commas?

Commas are optional in GraphQL. The formatter keeps them between arguments that share a line and leaves them out when arguments go on separate lines.

Is my query uploaded?

No. Formatting runs in your browser, so tokens or private field names in the query never leave your device.

Can it change what my query means?

It only changes spacing, line breaks and commas. The tests check that formatting and minifying keep every token, and that formatting twice gives the same result as once.

  1. 056

    JSON Formatter & Validator

  2. 105

    SQL Formatter

  3. 017

    cURL to Fetch Converter

  4. 028

    Fetch to cURL Converter