# GraphQL Formatter

> Format or minify a GraphQL query, mutation or schema, and inspect its depth.

A GraphQL formatter indents a query, mutation or schema so its selection sets are readable, or minifies it by stripping every optional space. Because it tokenises rather than pattern-matching, braces inside string literals and comments cannot corrupt the indentation.

**URL:** https://convertto.tech/t/graphql-formatter
**Category:** Developer Tools (https://convertto.tech/c/developer-tools)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Enter or paste your graphql.
2. Choose the mode.
3. Set the indent.
4. The result appears immediately — copy or download it.

## FAQ

### Does formatting change how a query executes?

No. Whitespace is insignificant in GraphQL, so formatting affects only readability. Minifying reduces the bytes sent, which matters for queries embedded in a mobile client but not for a server-to-server call.

### Why do servers limit query depth?

Because GraphQL lets a client request arbitrarily nested data, and a deeply recursive query can force the server to resolve millions of records from one small request. A depth limit of 7 to 10 is the standard defence.

## Related tools

- [Sample API Response Generator](https://convertto.tech/t/sample-api-response-generator): Generate realistic REST, JSON:API, GraphQL and error-envelope responses with pagination.
- [API Request Builder](https://convertto.tech/t/api-request-builder): Build an HTTP request visually and get it as curl, fetch, axios, Python, Go or PHP code.
- [HTTP Status Code Reference](https://convertto.tech/t/http-status-codes): Look up what any HTTP status code means and when to use it.
- [JSON Schema Generator](https://convertto.tech/t/json-schema-generator): Infer a JSON Schema from example data, detecting types, string formats and required keys.
- [SQL IN Clause Builder](https://convertto.tech/t/sql-in-clause-builder): Turn a pasted column of values into a safely quoted SQL IN clause, batched if needed.
- [URL Builder](https://convertto.tech/t/url-builder): Compose a URL from its parts with correctly percent-encoded query parameters.
- [Add Page Numbers to PDF](https://convertto.tech/t/add-page-numbers-pdf): Number the pages of a PDF with a custom start, position and format.
- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
