Dev X-Ray

GraphQL Formatter

GraphQL Formatter formats and beautifies GraphQL queries, mutations and schemas directly in your browser. Paste or drop a document and it is pretty-printed with Prettier, or minified back down, without the text ever being sent to a server.

Because the document is parsed into a real AST rather than pattern-matched, the same pass reports its depth, field, argument, operation and fragment counts, lets you filter the query down to the fields you actually want, and pulls inline literals out into variables.

Nothing is uploaded and there is no account: the formatting, the analysis and the export all happen on your own machine.

What it does

  • Format and minify GraphQL queries, mutations and schema definitions
  • Report query depth, field, argument, operation and fragment counts
  • Filter a query down to a chosen set of fields
  • Extract inline literals into GraphQL variables
  • Export the query as a cURL, fetch or Python request
  • Report syntax errors inline, at the offset that caused them

The interactive tool loads in a moment. It runs entirely in this browser — nothing you paste is uploaded.