API

GraphQL Query Formatter

Paste a minified or messy GraphQL query or schema and get a clean, properly indented version back.

Did this tool save you some time? A quick testimonial helps a lot.

Share your experience

About this GraphQL Query Formatter

Paste a minified or messy GraphQL query or schema and get a clean, properly indented version back.

Usage and privacy

How to use it

Add your input to the workspace above, review the result, then copy or download it when it's ready. No account or installation is required.

Private by design

GraphQL Query Formatter runs in your browser, so the information you enter stays on your device instead of being uploaded to a server.

GraphQL Query Formatter examples

A few worked examples so you know what to expect before you paste in your own input.

Minified query

Input

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

Output

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

Input

mutation{createUser(name:"Ada"){id name}}

Output

mutation {
  createUser(name: "Ada") {
    id
    name
  }
}
Deeply nested selection

Input

query{me{id posts{title comments{text}}}}

Output

query {
  me {
    id
    posts {
      title
      comments {
        text
      }
    }
  }
}

Frequently Asked Questions

Related Tools