GraphQL Formatter
Beautify and minify GraphQL queries, mutations, and schema definitions online.
What is GraphQL?
GraphQL is a query language for APIs and a runtime for executing those queries. Unlike REST APIs, GraphQL lets clients request exactly the data they need. It was developed by Facebook and released as open-source in 2015.
GraphQL queries can become long and complex. Proper formatting makes them much easier to read, debug, and share with teammates.
How to Use
- Paste your GraphQL query, mutation, subscription, or schema
- Choose Beautify or Minify mode
- Copy the formatted result
Frequently Asked Questions
What GraphQL operations are supported?
Queries, mutations, subscriptions, fragments, inline fragments, type definitions (type, input, interface, enum, union, scalar), and directives.
Why minify GraphQL queries?
Minified queries are smaller to send over the network and are used in production request payloads to reduce bandwidth.
Are # comments preserved?
In Beautify mode, comments are preserved. In Minify mode, they are removed.
Does it validate the GraphQL syntax?
This tool formats GraphQL text structurally without a full parser. For strict schema validation, use tools like graphql-inspector or a GraphQL IDE.
Is my query data sent anywhere?
No. All formatting happens locally in your browser.