Omnikit
DevFilesMoneyAll tools
Ctrl K
Dev toolsFile toolsMoney calculatorsAll tools
HomeDeveloper toolsGraphQL FormatterGraphQL Validator

GraphQL Validator

dev

Check a GraphQL query or schema for errors, optionally against your own SDL

Runs in your browser. Nothing you type is sent anywhere. Checked against sources on 22 Oct 2026.

Paste a query and see every problem with its line and column: syntax errors from the reference parser, variables that are used but never declared or declared but never used, unknown or unused fragments and duplicate names. Paste your schema too and the query is checked with every rule of the GraphQL specification, so unknown fields, wrong argument types and missing sub-selections show up before the request is sent.

Next:
  • JSON Formatter & Validator Format, validate, minify and sort JSON with exact error positions
  • OpenAPI Viewer and Validator Paste or drop an OpenAPI or Swagger file: see every endpoint by tag and every broken $ref

How to validate a GraphQL query

1

The page opens with Check against a schema turned on.

2

Paste your query into the GraphQL pane and your schema, in SDL, into the Schema pane.

3

Read each problem with its line and column; schema errors are marked as such.

4

Fix the query until the checks say no problems found, then copy the formatted result.

How GraphQL Validator works

Queries copied from logs, network tabs or code are often on one line or indented by hand. Paste one here and it is formatted as you type, one field per line, with the indent you choose. The parser and printer are graphql-js, the reference implementation that most JavaScript GraphQL servers run, so a document that parses here is one your server will parse too.

Checks with your schema. Turn on Check against a schema and paste your SDL, and every rule of section 5 runs: unknown fields with suggestions, arguments of the wrong type, missing sub-selections, fragments on the wrong type. A schema file on its own is checked too: unknown types, duplicate names, interfaces not fully implemented.

Comments. The graphql-js printer drops comments. Comments above a definition and at the end of the file are put back where they were; a comment inside a definition is counted and reported, so nothing is lost without you knowing. Minify removes every comment and all optional whitespace and commas, which is what you want for a GET request or a persisted query.

The rest of the article, and all 6 questions about GraphQL Formatter, are on the GraphQL Formatter page.

Frequently asked questions

How do I format a GraphQL query online?

Paste the query into the GraphQL pane and the formatted version appears next to it as you type. Pick 2 spaces, 4 spaces or a tab, then press Copy or Ctrl+Enter. Schemas in SDL, mutations, subscriptions and fragments are formatted the same way.

Can I validate a query against my schema?

Yes. Turn on Check against a schema and paste your schema in SDL. The query is then checked with every validation rule of the GraphQL specification, and each problem, such as an unknown field or an argument of the wrong type, is listed with its line and column.

Is my query or schema sent to a server?

No. Parsing, formatting and validation all run in your browser with the graphql-js library, so the query, its variables and your schema never leave your device. Internal schemas and queries with real IDs are safe to paste.

What errors can be found without a schema?

Syntax errors, variables used but not declared, variables declared but never used, unknown or unused fragments, fragment cycles, duplicate operation, variable, argument and input field names, and an anonymous operation next to other operations. Field names and types need the schema to be checked.

Sources

  • GraphQL specification, October 2021 editionGrammar, validation rules (section 5) and the type system (section 3)
  • graphql-js 16.9.0, the reference implementation (MIT)parse, print, stripIgnoredCharacters, validate, validateSDL and validateSchema, used as they are
  • GraphQL.org: Schemas and TypesSDL: types, interfaces, unions, enums, input types, descriptions

Last verified 22 October 2026.

Rates and rules change; check the source before you rely on a figure.

Still stuck? Ask about GraphQL Formatter and anybody who knows can answer. No account needed.

More ways to use GraphQL Formatter

  • GraphQL FormatterFormat, minify and validate GraphQL queries and schemas, with errors by line and column

Same job, other tools: JSON Validator – Check JSON and see exactly where it breaks · XML Validator – Check XML is well formed and see exactly where it breaks.

On the related tools: Markdown to HTML – Convert Markdown into clean, safe HTML you can paste anywhere.

Related tools

All developer tools
JSON Formatter & ValidatorFormat, validate, minify and sort JSON with exact error positionsSQL FormatterFormat and beautify SQL for PostgreSQL, MySQL, SQL Server and moreMarkdown PreviewWrite Markdown and see it rendered live, with tables, task lists and codeHTML Formatter & MinifierIndent messy HTML, or minify it and see the bytes you savedCSS Beautifier & MinifierTidy a stylesheet or minify it, with the size saved shownJavaScript Beautifier & MinifierBeautify JavaScript, or minify it and see how many bytes wentXML Formatter & ValidatorIndent XML, minify it, and see the first error by line and columnMIME TypesExtension to MIME type and back, with magic bytes and the header to send
Was this tool helpful?
Omnikit

Small jobs, done in your browser. Free, fast and private. Files are never uploaded.

Files

  • Compress Image
  • Image to PDF
  • Merge PDF
  • Compress PDF
  • PDF to Word
  • Word to PDF

Dev

  • JSON Formatter & Validator
  • Base64 Encode & Decode
  • JWT Decoder, Verifier & Encoder
  • Password Generator
  • UUID Generator
  • Unix Timestamp Converter

Money

  • SIP Calculator
  • EMI Calculator
  • GST Calculator
  • FD Calculator
  • PPF Calculator
  • Lumpsum Calculator
GuidesQuestionsAboutHow we checkLaw library (beta)PrivacyTermsDisclosureContactMore: Exam practice (UGC NET Paper 1)Runs in your browser. Nothing is uploaded. © 2026 Omnikit (theomnikit.com)