GraphQL Formatter
Format GraphQL queries, mutations, fragments and schema definitions (SDL) with Prettier.
Runs in your browserGraphQL → GraphQL
Loading tool…
Example
query{user(id:1){name friends(first:2){name}}}query {
user(id: 1) {
name
friends(first: 2) {
name
}
}
}How to use the GraphQL Formatter
- Paste or type your GraphQL into the input area, or open a file from your device.
- Adjust the options above the editor if the tool offers any.
- Review the GraphQL result, then copy it or download it as a file.
Privacy and limitations
- Your data is processed on your device and is not uploaded to any server.
Related converters
Java FormatterFormat Java source code with Prettier and prettier-plugin-java: classes, records, lambdas, generics and long call chains.Markdown FormatterNormalise Markdown with Prettier: consistent list markers, headings, emphasis and table alignment.PHP FormatterFormat PHP code with Prettier and the official PHP plugin, PSR-12 style, with a target PHP version setting.HTML BeautifierBeautify HTML with Prettier: consistent indentation plus formatting of embedded CSS and JavaScript.Less FormatterFormat Less stylesheets with Prettier, keeping variables, mixins and nested rules readable.SCSS FormatterFormat SCSS/Sass stylesheets with Prettier, handling nesting, variables, mixins and maps.CSS BeautifierBeautify minified or messy CSS into readable, consistently indented rules with one declaration per line.TypeScript FormatterFormat TypeScript and TSX with Prettier, including interfaces, generics, enums and decorators.