Skip to main content

GraphQL Query Formatter & Tester

Uses network

Format GraphQL queries, validate variables safely, convert SDL to TypeScript and execute queries.

What is GraphQL Query Formatter & Tester?

Format GraphQL queries and SDL schemas, validate variables JSON safely without crashes, generate TypeScript interfaces from GraphQL SDL, and optionally execute queries against any CORS-enabled GraphQL endpoint.

How to use GraphQL Query Formatter & Tester

  1. Step 1

    Paste a GraphQL query and variables JSON.

  2. Step 2

    Format the query or switch to SDL → TypeScript mode.

  3. Step 3

    Optionally enter an endpoint URL and headers to run the query.

Features

  • Prettier GraphQL formatting
  • Safe variables JSON parser with line/col diagnostics
  • GraphQL SDL to TypeScript type generator
  • Optional network query runner with headers

Example

Input

query GetUser($id:ID!){user(id:$id){id name}}

Output

query GetUser($id: ID!) {
  user(id: $id) {
    id
    name
  }
}

Formats GraphQL selections and builds the JSON request payload.

Frequently asked questions

Does formatting send my query to a server?

No. Formatting and SDL-to-TypeScript run strictly in your browser.

When does it use the network?

Only when you explicitly click Run Query against a target GraphQL endpoint.

Can it convert GraphQL SDL to TypeScript?

Yes, switch to the SDL → TypeScript tab.

Are invalid variables JSON handled safely?

Yes, errors display cleanly in the Problems panel.