GraphQL to cURL
Turn a GraphQL operation (plus optional variables) into a ready-to-run curl command — entirely in-browser. · Updated
Options
GraphQL endpoint URL:
HTTP method:
graphql
cURLshell
Draft saved locally.
Options
| 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. |
FAQ
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.
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.
Related tools
GraphQL Formatter & Minifier
Format, beautify, validate AST, and minify GraphQL queries, mutations, subscriptions, and SDL schemas.
GraphQL to TypeScript
Generate readable TypeScript interfaces, enums, unions, and scalar types from GraphQL SDL.
cURL to Code
Convert raw cURL shell commands into clean JavaScript Fetch, Axios, or Python requests code instantly.
HAR to cURL / Fetch
Paste a Chrome DevTools HAR export and generate ready-to-run curl, fetch, or axios snippets.