Text and dataRuns in your browser

GraphQL Formatter for Documents and Operations

Make a GraphQL document easier to review while preserving comments, strings, block strings, and fragment spreads.

  • Queries and mutations
  • Fragments and directives
  • No schema fetch
Online tool

Try the tool

Add your data, choose the settings, and get the result.

GraphQL document

Formatted document

—

The formatter checks bounded lexical structure and balanced delimiters while preserving comments, strings, and block strings. It does not validate against a GraphQL schema or execute the operation.

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Paste a GraphQL document.

  2. 2

    Choose the indentation size and run the formatter.

  3. 3

    Review the structure and copy the formatted document.

02

What the tool can do

  • Operation definitions, variables, arguments, and directives.
  • Selection sets, aliases, fragments, inline fragments, and type conditions.
  • Comments, escaped strings, and triple-quoted block strings.
  • Checks for matching braces, parentheses, and brackets.
03

Common use cases

  • Preparing a query for a pull request or documentation.
  • Reviewing a compact GraphQL payload copied from logs.
  • Catching obviously unbalanced delimiters before debugging.
04

How it works inside

Input is limited to 500,000 characters, 20,000 tokens, and depth 64.

Commas are treated as insignificant GraphQL tokens and are not required in the output.

05

Questions and answers

Is the GraphQL query sent to my server?

The query is only formatted as text in the browser. No server address or access token is required. The tool does not execute it or retrieve application data.

How can I check whether the requested fields exist?

Compare the query with your service's schema or use its development environment. This formatter does not load a schema or verify field existence. It helps present code, including fragments and multiline strings.