How to use GraphQL Query Formatter and Validator
- Paste a GraphQL document.
- Choose indentation and line width, then format the document.
- Review syntax errors and copy the formatted source.
Example: GraphQL Query Formatter and Validator
query GetUser($id:ID!){user(id:$id){id name}}
Options
- Document
- Paste a query, mutation, subscription or other supported GraphQL document. Parsing concerns syntax and preserves the declared fields and variables.
- Indent and width
- Formatting choices control the downloaded source layout. They do not change the endpoint, variable values or permissions of an operation.
Supported inputs and limits
Where your input is processed
This tool processes your input in this browser. Your text and files are not uploaded to UseFreeTools. Check this tool's limits for anything it may save on your device.
A parsed query may still fail against a schema
Syntax can be valid while a field, argument or type is absent from the actual API. This page has no schema and makes no requests. Validate the operation against its intended schema, supply the required variables and review its effects before running it in another system. Formatting does not estimate query cost.
Questions about GraphQL Query Formatter and Validator
Does valid syntax prove a query will work?
No. The server schema and variable values must also match.
Will the query be sent to an endpoint?
No. Syntax processing happens in this browser.
Does formatting execute mutations?
No. It changes source layout without running any operation.