GraphQL formatter
Pretty-print and validate GraphQL queries, mutations, and schemas — privately in your browser.
About the GraphQL formatter
Handytool's GraphQL formatter parses any GraphQL document — queries, mutations, subscriptions, or SDL schema definitions — using the official graphql.js parser, then re-emits it with consistent indentation. The Validate button confirms the document parses without rendering it. Everything runs locally, so it's safe to format internal API queries or proprietary schemas.
GraphQL formatter features
- 01
Official graphql.js parser
The same parser the GraphQL reference implementation ships with. Errors come with the exact line and column, and formatting is canonical.
- 02
Queries, mutations, and SDL
Operation documents and schema definitions both work. Type definitions, directives, and descriptions round-trip cleanly.
- 03
Validate without running
Validate just confirms the document parses. It doesn't execute the query, doesn't need a schema, and doesn't make network calls.
GraphQL formatter FAQ
- Does this validate against a schema?
- No — only syntactic validation. Schema-aware validation needs the target schema to compare field names and argument types; this tool only confirms the document parses.
- Will it preserve my comments?
- GraphQL comments (lines starting with #) are stripped by the parser. To keep documentation, use """description""" string literals on type and field definitions — those round-trip correctly.
- Which GraphQL spec version does this support?
- The current October 2021 spec, including features like OneOf input objects and the @specifiedBy directive.
- Is the query uploaded anywhere?
- No. The graphql.js parser runs entirely in your browser — your operations stay on your device.
Related tools
Developer →- Live
SQL formatter
Pretty-print SQL queries — PostgreSQL, MySQL, SQLite, BigQuery and standard SQL — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
YAML formatter
Format and validate YAML, or convert between YAML and JSON — privately in your browser.
DeveloperFreeRuns locallyOpen - Live
XML formatter
Pretty-print, minify, and validate XML — entirely in your browser.
DeveloperFreeRuns locallyOpen
Explore other tools
All tools →- Live
PDF to JPG
Convert each page of a PDF into a sharp JPG, PNG, or WebP image right in your browser — no upload, no quality loss.
PDFFreeRuns locallyOpen - Live
Remove background
Erase the background of a photo using an in-browser AI model — no upload, your images stay on your device.
ImageFreeRuns locallyOpen - Live
Trim Video
Cut the start or end of a video with frame-level precision.
VideoFreeOpen - Live
Trim audio
Cut a section of an audio file.
AudioFreeRuns locallyOpen - Live
Markdown to HTML
Convert Markdown into clean HTML right in your browser.
DocumentFreeRuns locallyOpen