GraphQL Formatter Online — Queries, Mutations & SDL

Format GraphQL queries, mutations, fragments and SDL with Prettier in your browser. It is not a schema validator, and nothing is uploaded.

Loading…
GraphQL Beautification
Beautify GraphQL online. Consistent indentation and spacing, processed in your browser with no uploads.

Features

Standard indentation for queries and SDL.

Beautify GraphQL

Standard indentation for queries and SDL.

Basic example

GraphQL source

query GetOrder($id: ID!) { order(id: $id) { id status customer { name email } lineItems { sku quantity price } } } fragment LineItemFields on LineItem { sku quantity }

Beautified GraphQL

query GetOrder($id: ID!) { order(id: $id) { id status customer { name email } lineItems { sku quantity price } } } fragment LineItemFields on LineItem { sku quantity }

Formatting options

Print width
Controls when Prettier wraps long lines: tighter for dense queries, wider for nested SDL.

JavaScript-specific options (semi, quotes, trailing comma) do not apply to this language.

Prettier-powered formatting

Formats queries, mutations and schema definitions. Browse all tools in the developer tools hub.

Local processing & data handling

Your GraphQL is parsed and reformatted in the browser with Prettier. No uploads, no server-side storage, and no account required, so it suits proprietary schemas, queries, and internal docs.

FAQ for Beautify GraphQL

Beautification

Schema vs query?

Both GraphQL query documents and SDL type definitions are supported.

Invalid syntax?

Syntax errors show a clear message with line hints. Fix them and retry.

How do I validate GraphQL schema SDL?

Formatting is here (Prettier). For schema SDL validation via buildSchema, use Validate GraphQL in the API tools cluster.

Is my GraphQL uploaded to a server?

No. Beautification runs entirely in your browser. Your GraphQL never leaves your device and is not stored by FastMinify.

Can I customize indentation?

Yes. Pick 2 or 4 spaces or tabs in the Beautify options toolbar.

Make code readable with consistent indentation. Beautify JavaScript, CSS, TypeScript, SCSS, LESS, Markdown, GraphQL, SQL, YAML and more in your browser.