GraphQL Query Decoder
Pretty-print and inspect GraphQL queries, mutations and schema documents.
This bench is being wired up
The graphql-decoder decoder is on the roadmap. The heavier binary and cryptographic parsers ship after the core text and token decoders — all of which are already live and working.
Browse the live decodersInput is processed on your device. Nothing you paste is sent anywhere.
What is the GraphQL Query Decoder?
A GraphQL query decoder parses a GraphQL document — a query, mutation, subscription or schema definition — and re-renders it with proper indentation and structure so a minified or URL-encoded operation becomes readable.
GraphQL operations travel as a single string, often minified into one line, URL-encoded into a GET request, or wrapped in a JSON body alongside a variables object and an operationName. Reading one in that state is painful; formatting it reveals the selection set, the fragments, the variable definitions and the directives at a glance.
Schema documents (SDL) benefit from the same treatment. Once formatted, an introspection result or a downloaded schema shows types, fields, arguments and deprecations in a structure you can actually scan — which is where you start when writing against an unfamiliar API, or when reviewing one for over-permissive fields.
GraphQL Query Decoder at a glance
- Operations
- query, mutation, subscription
- Transport
- POST JSON {query, variables, operationName}
- Schema language
- SDL — type, interface, union, enum, input
- Introspection
- __schema and __type meta-fields
How to use the GraphQL Query Decoder
- 1Paste the GraphQL operation or SDL document, minified or not.
- 2Read the formatted output with indentation and nesting restored.
- 3Check the variable definitions and directives against what your client sends.
When you would reach for it
- Making sense of a minified GraphQL query captured from a network tab.
- Reviewing a downloaded schema for deprecated or over-exposed fields.
- Formatting an operation before pasting it into a bug report or ticket.
GraphQL Query Decoder — frequently asked questions
Last reviewed · questions or corrections: contact@decoder.tools