Pretty-print or minify GraphQL queries and SDL.
query
getUser($id: ID
!) {
user(id: $id) {
id
name
email
posts(first: 5) {
id
title
}
}
}
Format messy GraphQL queries, mutations, and SDL schemas with consistent indentation, or minify to a single line. Includes a syntax check that flags unmatched braces, missing brackets, and stray characters.
The GraphQL Formatter & Minifier helps developers quickly clean up messy queries, mutations, and SDL schemas with consistent indentation or condense them into a single line. Built-in syntax checking instantly flags common errors like unmatched braces, missing brackets, and stray characters directly in the browser. Completely free with generous rate limits, it provides a fast way to organize GraphQL code without requiring software installations or account signups.
Good to know: Very large schemas or projects requiring automated CI/CD pipeline integration may benefit from command-line linting tools instead of a browser-based utility.
Quickly format messy GraphQL queries or minify SDL schemas for optimized production use.
Paste your GraphQL code into the editor
Copy your unformatted GraphQL query, mutation, or SDL schema and paste it into the input text area.
Check for syntax errors and unmatched braces
Review the automatic syntax check to identify missing brackets, stray characters, or structural issues in your code.
Choose between formatting or minifying your code
Select the 'Format' option for consistent indentation and readability, or choose 'Minify' to compress the code into a single line.
Copy the processed GraphQL output
Once the tool applies the changes, copy the resulting pretty-printed or minified code to your clipboard for use in your project.
Estimated time: PT1M
Share this tool
Beautify, minify, and validate JSON data instantly.
Format and beautify SQL queries with proper indentation and keyword casing.
Format and beautify or minify JavaScript code instantly.
Encode and decode Base64 strings instantly.
Generate v4 UUIDs instantly, single or in bulk.
Explain any code in plain language — all languages supported.
Percent-encode or decode URL strings instantly.
Encode/decode HTML entities like < > &.
Convert Unix epoch timestamps to/from readable dates.
Convert text or Markdown to a Word .docx file with live preview, RTL, and page-setup options.
Draw a Secret Santa with exclusions and share a private reveal link for each person.
Make custom bingo cards from your own words — play, print, or share a link.
Convert images to video with the Ken Burns zoom/pan effect. Add music and export as WebM.
Load and compare multiple URLs side by side in resizable iframes.
Rank anything with quick 1-v-1 matchups → a full ordered list you can share.
Convert Markdown to a fully customized, RTL-ready PDF.
See your public IP address plus full location, ISP, ASN, timezone, coordinates, and more.