GraphQL Formatter
Format and indent GraphQL code into a clean, readable structure directly in your browser.
This tool runs entirely in your browser. Your files are never uploaded to a server.
query User($id:ID!) {
user(id:$id) {
id name email
}
}What this formatter does
Adds line breaks around GraphQL-style braces and after commas, with two-space indentation for nested brace levels. It preserves ordinary quoted text and offers an immediate result that can be copied.
How to use it
Paste a query, mutation, fragment, or schema-like text and inspect the output. Reset clears the editor rather than restoring the sample.
Important limitations
This is a generic brace formatter, not a GraphQL parser, validator, schema checker, or canonical printer. It does not verify fields, variables, directives, types, or balanced syntax. GraphQL # comments are not recognized as comments, so newline collapsing can change what a comment covers; do not use it on documents containing # comments without a careful manual review. Block strings and unusual escapes also need checking.
Privacy
Formatting runs locally in your browser. Queries, schema text, and copied output are not uploaded by this tool.
Frequently Asked Questions
- What does the GraphQL Formatter do?
- Format and indent GraphQL code into a clean, readable structure directly in your browser.
- Does this GraphQL tool change program behavior?
- It only changes layout or removable whitespace. Review minified output before production use when code relies on unusual syntax.
- Is my code uploaded?
- Processing is local and your code is never uploaded.