Skip to content

API & Network Tools · free · no sign-up

GraphQL Query Formatter

Format a GraphQL query with proper indentation.

How it works Report a problem

GraphQL Query Formatter

Beautify, indent, and format GraphQL queries.

Input Data

About the GraphQL Query Formatter

Format a GraphQL query with proper indentation.

How to use the GraphQL Query Formatter

  1. Paste your code into the input box, or click Sample to load an example.
  2. Press Process / Generate.
  3. Use Copy (or Download where shown) to keep the result. Clear empties the box.

Worked example

query { user(id: 1) { name email } } is laid out with each field on its own line.

Tips

  • Readable queries are easier to debug and review.

Frequently asked questions

Does formatting change the query?
No. Only whitespace changes.