Code Beautifier

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

OptionDescription
GraphQL endpoint URLTarget URL embedded in the curl command. Edit the output if you need a custom host.
HTTP methodMost GraphQL APIs expect POST with a JSON body.
Include Authorization placeholderAdds an Authorization: Bearer YOUR_TOKEN header placeholder.
Keep query whitespaceWhen 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.