Prettify or minify GraphQL queries, mutations, and fragments online. No external packages — runs entirely in your browser.
The GraphQL Formatter instantly prettifies or minifies any GraphQL query, mutation, subscription, or fragment. It adds consistent 2-space indentation, places each field on its own line, and preserves comments, string literals, and arguments exactly.
# line comments and block string literalsMinified GraphQL queries reduce payload size in HTTP requests and can improve performance when sending queries as URL parameters (GET requests). Use pretty-print for readability during development and code reviews.
{user(id:"123"){id name email profile{avatar bio}}}{
user(id: "123") {
id
name
email
profile {
avatar
bio
}
}
}Hierarchically indents nested selection sets for instant readability.
Yes. It checks balanced braces, argument colons, and valid token syntax, highlighting syntax errors if present.
No. GraphQL servers ignore whitespace outside of string literals. Formatting only enhances human readability.
Explore more free utilities in Development
Regex Tester
Real-time regular expression tester with highlighting and cheat sheet.
Open
JSON Diff
Compare two JSON objects structurally to find differences.
Open
Subnet Calculator
Calculate IP ranges, netmasks, and CIDR subnet details.
Open
Cron Generator
Visual builder for Cron schedules with next-run previews.
Open
CSS Box Shadow
Visually design and generate CSS box-shadow code.
Open
Gitignore Generator
Create custom .gitignore files for your projects instantly.
Open