Formatter
GraphQL Formatter
Format and beautify GraphQL queries, mutations, fragments, and schemas online. Process GraphQL locally in your browser.
Tool
Format and beautify GraphQL queries, mutations, fragments, and schemas online. Process GraphQL locally in your browser.
This tool runs in your browser. Your input is processed locally and is not uploaded.
About this Tool
Use this free GraphQL Formatter to clean up queries, mutations, subscriptions, fragments, and schema definitions. Paste compact or inconsistently formatted GraphQL, validate its syntax, and generate a readable structure with consistent indentation and spacing. Processing runs locally in your browser, and the tool does not connect to or execute requests against a GraphQL endpoint.
Examples
- query GetUser($id:ID!){user(id:$id){id name email orders{ id total }}}
- mutation UpdateStatus($id:ID!,$status:Status!){updateOrder(id:$id,status:$status){id status updatedAt}}
- type Product{id:ID! name:String! price:Float! active:Boolean!}type Query{product(id:ID!):Product}
Frequently Asked Questions
What GraphQL content can be formatted?
The tool can format queries, mutations, subscriptions, fragments, variable definitions, directives, and schema definition language documents.
Does the formatter send requests to a GraphQL API?
No. It parses and formats the text only and does not contact an endpoint.
Can GraphQL syntax errors be detected?
Yes. Invalid operations, fragments, arguments, variable declarations, and schema syntax should be reported before formatting.
Is my GraphQL uploaded?
No. GraphQL parsing and formatting run locally in your browser.