GraphQL Formatter

GraphQL

Format, minify, and validate GraphQL schemas and queries; convert SDL ↔ TypeScript, infer SDL from JSON; generate mock data from SDL types; inline fragment spreads; browse introspection schemas.

Strip Comments

GraphQL

Format, minify, and validate GraphQL schemas and queries; convert SDL ↔ TypeScript, infer SDL from JSON; generate mock data from SDL types; inline fragment spreads; browse introspection schemas.

Common uses

  • Format a multi-operation GraphQL document
  • Minify a GraphQL schema
  • Generate TypeScript types from a GraphQL SDL
  • Infer SDL types from a JSON API response
  • Generate mock JSON from a GraphQL type
  • Inline all fragment spreads into a query

Also searched as

  • graphql formatter online
  • graphql query beautifier
  • minify graphql query
  • validate graphql schema online
  • graphql sdl to typescript
  • typescript to graphql schema
  • json to graphql schema
  • generate mock data from graphql schema
  • inline graphql fragments
  • graphql introspection result viewer
  • graphql query complexity analyzer

Frequently asked questions

How do I format a GraphQL query or schema?

Paste it into the Format tab to beautify, minify or validate GraphQL queries and SDL.

How do I generate TypeScript types from a GraphQL schema?

Open the Converters tab and choose SDL → TypeScript. The same tab also has TypeScript → SDL and JSON → SDL modes, the last of which infers types from a JSON response.

Can I generate mock data from a GraphQL type?

Yes, the Mock tab creates sample JSON from your SDL types.

Can I inline fragment spreads in a query?

Yes, the Format tab has an inline-fragments option that expands fragment spreads so a query becomes a single self-contained document.

Can I browse a GraphQL introspection result?

Yes, the Introspection tab lets you load an introspection JSON result and browse its types, and the Complexity Analyzer tab reports a query's depth, field count and score against thresholds you set.

Is my data uploaded to a server?

No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.