Developer Tools

GraphQL Formatter

Format, beautify, and inspect GraphQL queries and schema definitions online.

Run tool

GraphQL Formatter is a web tool designed for GraphQL queries, mutations, subscriptions, and schema definitions. The interface accepts document text alongside configuration options for display style and indentation spacing. When configuring the tool, you can set the indentation width between 0 and 8 spaces, with 2 spaces applied as the standard default. The mode selector lets you designate beautify for multi-line indentation or minify for compact payload structuring. The tool enforces an upper input limit of 1,000,000 UTF-8 bytes for submitted text. Submitting blank or whitespace-only queries completes immediately, yielding an empty output panel with zero recorded bytes. Nonblank requests are processed according to the selected mode and indentation rules. The tool does not perform query validation, schema execution, or network calls against a remote GraphQL endpoint. You can enter query text in the main field, adjust formatting options, and review the resulting panel.

Instructions

  1. Paste your GraphQL query, mutation, or schema text into the input field.
  2. Choose your preferred indentation level between 0 and 8 spaces.
  3. Select your target mode, choosing beautify for multi-line formatting or minify for compact payloads.
  4. Click Run to submit the document and review the formatted text in the output panel.

Examples

  • Submitting a blank text field returns an empty result string with zero input and output bytes.
  • Providing a multi-line query with an indentation value of 4 applies four-space indent rules to the request structure.

FAQ

What is the maximum allowed input size?

The tool accepts GraphQL input text up to 1,000,000 UTF-8 bytes.

Does this tool validate or execute GraphQL queries?

No. The tool handles formatting and text layout only; it does not validate syntax, check schemas against a server, or execute queries.

What happens when blank text is submitted?

When you submit an empty or whitespace-only input, the tool returns an empty result panel with zero byte counts.

What indentation levels are supported?

You can select any integer indentation level between 0 and 8 spaces. Values outside this range automatically default to 2 spaces.

Embed this tool

Add this working SmartPlusLab tool to your website with the code below.