Clean curl commands for LLMs and AI agents
When you paste a raw DevTools curl into ChatGPT, Claude, Cursor, or another agent, you pay
for every character — including User-Agent, Sec-Fetch-*, and
dozens of headers the model does not need. Curl Cleaner shrinks the command so your prompt
focuses on the actual API call.
Why browser curl commands waste tokens
A typical Chrome “Copy as cURL” export is 1,500–3,000 characters. Roughly half is browser metadata: client hints, fetch metadata, accept headers, and encoding preferences. None of that helps an LLM understand or replay your API request.
Curl Cleaner removes that noise client-side — nothing is uploaded — and shows an approximate token count before and after so you can see the savings immediately.
What to keep for agent prompts
- URL and HTTP method — the endpoint being called.
- Authorization — Bearer tokens, API keys (redact before sharing publicly).
- Content-Type — tells the agent the body format.
- Request body — JSON, form data, or GraphQL payload.
- Cookie — only if the session matters (toggle in Settings).
Workflow for coding agents
- Reproduce the API call in your browser and copy as cURL.
- Paste into Curl Cleaner — cleaned output appears instantly.
- Copy the minimal curl and paste into your agent with a prompt like “convert this to a Python script” or “debug this 401”.
- Use the token estimate in the footer to confirm you trimmed enough context.
Related tools
Need code instead of curl? Try the curl to fetch converter or curl to Python requests converter after cleaning your command.
Clean a curl command now