DevUtilX

GraphQL Query Formatter/Minifier

Format and beautify GraphQL queries, mutations, and schemas. Paste your GraphQL on the left and get formatted output on the right.

Format Options

How to Use the GraphQL Query Formatter/Minifier

  1. Paste your GraphQL query, mutation, subscription, or schema in the left editor.
  2. Configure formatting options (indentation, field sorting, comments, minification).
  3. Click the Format button.
  4. View the beautifully formatted GraphQL in the right editor.
  5. Click the copy button to copy the formatted output.
  6. If there's a syntax error, the exact error message will appear in the output area.

Supported GraphQL Features:

  • Queries - Format query operations with fields, arguments, and variables
  • Mutations - Format mutation operations and input types
  • Subscriptions - Format subscription operations for real-time data
  • Fragments - Format reusable fragment definitions and inline fragments
  • Directives - Format GraphQL directives like @include, @skip, @deprecated
  • Schema Definitions - Format type definitions, interfaces, unions, and enums

💡 Pro Tip: Use the "Sort Fields" option to automatically organize your GraphQL fields alphabetically for better consistency across your team.