Convert cURL commands and HAR files into valid Apache JMeter JMX test plans. Supports GET, POST, PUT, DELETE, PATCH, and RFC 9838 QUERY.
Parsed Endpoints
Generated Apache JMeter JMX XML
JMeter 5.6.3 Valid🤖 Add this conversion tool to your AI Agent (MCP)
Claude Code, Cursor, Windsurf, and other agents can call convert_curl_or_har_to_jmx directly over Model Context Protocol:
claude mcp add jmeter-docs https://docs.jmeter.ai/api/mcp --transport httpClient-side Browser Security: All on-page conversions run 100% locally in your browser. When using the hosted MCP endpoint (/api/mcp), ensure sensitive production passwords and API keys are redacted. See HTTP Request Sampler Manual and JMeter MCP Reference.
How the Converter Works
Section titled “How the Converter Works”Creating JMeter test plans manually for dozens of API endpoints is slow and error-prone. This converter takes raw cURL commands (from Swagger, Postman, browser DevTools, or terminal history) and HAR 1.2 network captures, automatically structuring them into a production-grade Apache JMeter 5.6.3 .jmx test plan.
What Gets Automatically Generated?
Section titled “What Gets Automatically Generated?”- HTTP Request Defaults (
ConfigTestElement): Detects the dominant target domain across your requests and parameterizes it into${BASE_URL}, making environment switching (Dev $\to$ Staging $\to$ Prod) effortless. - HTTP Header Manager (
HeaderManager): Preserves required custom headers (Content-Type,Accept,X-Api-Key), while stripping transport-level noise (Content-Length) that JMeter calculates dynamically. - HTTP Cookie Manager (
CookieManager): Auto-injected to manage session cookies and cross-request state across iterations. - Auth Parameterization: Automatically detects
Authorization: Bearer <token>and parameterizes it as${AUTH_TOKEN}in User Defined Variables. - Robust Timeouts: Connect timeout is preset to
5000msand response timeout to15000mson every sampler to prevent thread pool lockup during load spikes. - Response Code Assertions: Generates baseline
ResponseAssertionelements validating HTTP 200, 201, and 204 status codes.
Full HTTP Method Support (Including QUERY RFC 9838)
Section titled “Full HTTP Method Support (Including QUERY RFC 9838)”The converter supports all standard and modern HTTP methods:
| Method | JMeter Implementation | Use Case |
|---|---|---|
GET | HTTPSamplerProxy (Query Params in Arguments or Path) | Fetching resources and reading data |
POST | HTTPSamplerProxy (postBodyRaw="true" or Form fields) | Creating resources / authentication |
QUERY | HTTPSamplerProxy (postBodyRaw="true", Method=QUERY) | Safe, idempotent complex queries with JSON payload bodies (Elasticsearch, GraphQL, modern REST) |
PUT | HTTPSamplerProxy (postBodyRaw="true") | Full resource replacement |
PATCH | HTTPSamplerProxy (postBodyRaw="true") | Partial resource modification |
DELETE | HTTPSamplerProxy | Removing resources |
HEAD / OPTIONS | HTTPSamplerProxy | Health checks and CORS preflight |
Example: HTTP QUERY Method in cURL
Section titled “Example: HTTP QUERY Method in cURL”curl -X QUERY "https://api.example.com/v1/catalog/search" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sample-jwt-token-xyz" \ -d '{ "filter": { "status": "in_stock", "price": { "lte": 150 } }, "sort": "price:asc" }'The converter translates this into a valid JMeter HTTP Sampler with the QUERY method and raw payload body configured without requiring custom plugins.
Running the Generated JMX in CLI Mode
Section titled “Running the Generated JMX in CLI Mode”Once you download the .jmx file, run it in non-GUI mode from your terminal:
jmeter -n -t test-plan.jmx -l results.jtl -e -o ./reportYou can override virtual users dynamically at runtime:
jmeter -n -t test-plan.jmx -Jthreads=100 -l results.jtl -e -o ./reportTo run for a fixed duration, set Duration to a value greater than zero before downloading the plan. This enables JMeter’s scheduler and generates the required infinite-loop behavior; adding -Jduration to a plan converted with Duration 0 does not enable the scheduler.
Use via AI Agent (MCP Tool)
Section titled “Use via AI Agent (MCP Tool)”You can call this converter directly inside Claude Code, Cursor, Windsurf, Qwen Code, and Copilot via our free Model Context Protocol server:
claude mcp add jmeter-docs https://docs.jmeter.ai/api/mcp --transport http --scope userPrompt your AI agent:
“Convert this cURL command into a JMeter test plan with 50 threads and 10s rampup:
curl -X QUERY https://api.example.com/v1/search -H 'Content-Type: application/json' -d '{\"query\":\"loadtest\"}'”
Your agent calls convert_curl_or_har_to_jmx and outputs schema-valid XML ready for execution.