cURL to GraphQL Parser
A cURL-to-GraphQL parser converts cURL commands (exported from Chrome DevTools) into structured GraphQL format. It extracts the query, variables, operation name, and HTTP headers from the cURL command. Use when debugging GraphQL APIs: copy the cURL from browser DevTools Network tab, paste it, and get a clean GraphQL request with all headers intact for use in GraphQL clients like Insomnia or Postman.
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
- Open Chrome DevTools (F12 or Cmd+Option+I)
- Go to the Network tab
- Find the GraphQL request (usually to /graphql endpoint)
- Right-click the request → Copy → Copy as cURL
- Paste it here
How to Use
- 1
Export cURL from browser
In Chrome or Firefox DevTools, go to the Network tab, right-click any GraphQL request, and select "Copy as cURL"
- 2
Paste the cURL command
Paste the copied cURL command into the input textarea
- 3
Parse the request
Click Parse to convert the cURL command into a structured GraphQL request with query, variables, and headers
- 4
Copy the result
Copy the formatted GraphQL query and headers for use in Insomnia, Postman, or your GraphQL client
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.