cURL to GraphQL Parser

Parse cURL commands containing GraphQL requests. Extract and format GraphQL queries, variables, and headers from Chrome DevTools cURL exports.

Paste cURL Command

Tip: In Chrome DevTools → Network tab → right-click request → Copy as cURL

How to get a cURL command from Chrome DevTools

  1. Open Chrome DevTools (F12 or Cmd+Option+I)
  2. Go to the Network tab
  3. Find the GraphQL request (usually to /graphql endpoint)
  4. Right-click the request → Copy → Copy as cURL
  5. Paste it here

How to Use

  1. Enter your value in the input field
  2. Click the Calculate/Convert button
  3. Copy the result to your clipboard

Frequently Asked Questions

What is cURL?
cURL (Client URL) is a command-line tool for transferring data using various protocols (HTTP, HTTPS, FTP, etc.). Developers use cURL to test APIs, download files, and debug network requests. A typical HTTP request looks like: curl -X POST https://api.example.com -H "Content-Type: application/json" -d '{"query": "..."}'
What is GraphQL?
GraphQL is a query language for APIs that lets clients request exactly the data they need. Unlike REST with fixed endpoints, GraphQL uses a single endpoint where clients specify their data requirements. This reduces over-fetching and enables more efficient API interactions.
How do I convert a cURL command to code?
Parse the cURL flags: -X sets the HTTP method, -H sets headers, -d sets the request body, and the URL is the endpoint. Our tool extracts these components and generates equivalent code in various languages. You can also use browser DevTools to copy requests as cURL.
What are common cURL flags?
Common cURL flags: -X (HTTP method), -H (headers), -d (data/body), -u (authentication), -k (skip SSL verification), -v (verbose output), -o (output file), -L (follow redirects), --compressed (accept compressed response). Multiple -H flags can set multiple headers.
How do I test a GraphQL API with cURL?
Use: curl -X POST https://api.example.com/graphql -H 'Content-Type: application/json' -d '{"query": "{ users { id name } }"}'. The query goes in the JSON body under the 'query' key. Variables go under 'variables'. The endpoint is typically a single /graphql path.

Related Tools