GraphQL Query → cURL
Turn a GraphQL operation (plus optional variables) into a ready-to-run curl command — entirely in-browser.
Local workspace
Named projects in IndexedDB · Local only — never synced to our servers. Worksp…
Batch workspace
Format multiple files locally in one run.
How to use the GraphQL to cURL
Paste code or file
Paste your raw GRAPHQL text or upload directly.
Configure options
Choose indentation, dialect, or formatting preferences.
Format & export
Click format, then copy, download, or inspect in tree view.
What is a GraphQL to cURL?
Turn a GraphQL operation (plus optional variables) into a ready-to-run curl command — entirely in-browser. This tool re-indents and organizes code according to standard style conventions while checking for syntax validity. Everything executes 100% inside your browser, guaranteeing zero latency and complete privacy for API keys, user tokens, and confidential database schemas.
Options Explained
| Option | Description |
|---|---|
| GraphQL endpoint URL | Target URL embedded in the curl command. Edit the output if you need a custom host. |
| HTTP method | Most GraphQL APIs expect POST with a JSON body. |
| Include Authorization placeholder | Adds an Authorization: Bearer YOUR_TOKEN header placeholder. |
| Keep query whitespace | When off, the query is minified inside the JSON body. |
Frequently Asked Questions
How do I include variables?
Append === VARIABLES === followed by JSON, or paste { "query": "...", "variables": {} }.
Can I set an operation name?
Named operations are detected automatically. You can also append === OPERATION === Name.
Is my query uploaded?
No. Conversion is local-only.
Does it validate GraphQL syntax?
Yes. Invalid documents return a parse error — fix them with GraphQL Formatter first if needed.
What about file uploads / multipart?
This MVP emits standard JSON POST bodies, not multipart GraphQL uploads.