GraphQL Formatter

Tidy a one-line query copied from a network tab, or a schema file, into clean indented GraphQL.

Input · drop a file

Output

What is supported

Queries, mutations, subscriptions, fragments, variables and directives, plus schema definition language (types, inputs, enums, interfaces, unions). The formatter is Prettier’s GraphQL printer.

Tip: to read a query captured from browser DevTools, copy the query field from the request JSON, then unescape it first if it is full of \n.

Questions

Does it validate against my schema?

No — it checks GraphQL syntax only. Field names are not checked.

Related tools