cURL to n8n Converter
Transform cURL commands into n8n HTTP Request node configurations for workflow automation
cURL to n8n Converter
Convert cURL commands into ready-to-import n8n HTTP Request nodes - instantly, with no AI required.
Access: /tools/developers/curl-to-n8n
Overview
cURL to n8n parses your cURL commands and generates n8n HTTP Request node configurations that you can directly import into your workflows. This is a pure client-side tool with no AI.
Key features:
- n8n v4.1 compatible - Latest HTTP Request node format
- Complete configuration - Headers, body, authentication
- Clipboard-ready JSON - Paste directly into n8n
- Multiple output modes - Node only or full workflow
- Instant conversion - No API calls, works offline
How to Use
- Paste cURL - Enter your cURL command
- Click Convert - Get n8n node configuration
- Copy JSON - One-click copy to clipboard
- Import in n8n - Paste into your workflow canvas
Importing into n8n
- Open your n8n workflow
- Click anywhere on the canvas
- Press
Ctrl+V(orCmd+Von Mac) - Node appears with full configuration
Example Input
curl -X POST 'https://api.slack.com/api/chat.postMessage' \
-H 'Authorization: Bearer xoxb-your-bot-token' \
-H 'Content-Type: application/json' \
-d '{
"channel": "C0123456789",
"text": "Hello from n8n!",
"blocks": [
{
"type": "section",
"text": {"type": "mrkdwn", "text": "*New notification*"}
}
]
}'
Example Output
n8n Node Configuration
{
"parameters": {
"method": "POST",
"url": "https://api.slack.com/api/chat.postMessage",
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer xoxb-your-bot-token"
},
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\n \"channel\": \"C0123456789\",\n \"text\": \"Hello from n8n!\",\n \"blocks\": [\n {\n \"type\": \"section\",\n \"text\": {\"type\": \"mrkdwn\", \"text\": \"*New notification*\"}\n }\n ]\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [0, 0],
"id": "generated-node-id",
"name": "HTTP Request"
}
Output Modes
Node Only (Default)
Single HTTP Request node configuration - paste directly into canvas.
Full Workflow
Complete workflow JSON including:
- Manual Trigger node
- HTTP Request node
- Node connections
- Workflow metadata
{
"meta": {
"instanceId": "generated"
},
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [0, 0],
"id": "manual-trigger-id",
"name": "Manual Trigger"
},
{
"parameters": { /* HTTP Request config */ },
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.1,
"position": [220, 0],
"id": "http-request-id",
"name": "HTTP Request"
}
],
"connections": {
"Manual Trigger": {
"main": [[{ "node": "HTTP Request", "type": "main", "index": 0 }]]
}
}
}
cURL to n8n Mapping
| cURL Option | n8n Field | Notes |
|---|---|---|
| URL | url | Full URL with query params |
-X method | method | GET, POST, PUT, DELETE, etc. |
-H headers | headerParameters | Array of name/value pairs |
-d JSON body | jsonBody | When Content-Type is JSON |
-d form body | bodyParameters | Parsed as key-value pairs |
-u user:pass | Basic Auth credentials | Maps to credential type |
-F multipart | bodyParameters | Form data mode |
| Query params | Extracted from URL | Shown in queryParameters |
Authentication Mapping
Bearer Token
curl -H 'Authorization: Bearer token123' ...
{
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{ "name": "Authorization", "value": "Bearer token123" }
]
}
}
Basic Auth
curl -u username:password ...
{
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth"
}
Note: Create n8n credentials separately and reference them.
API Key
curl -H 'X-API-Key: your-api-key' ...
{
"headerParameters": {
"parameters": [
{ "name": "X-API-Key", "value": "your-api-key" }
]
}
}
Body Type Handling
JSON Body
curl -H 'Content-Type: application/json' -d '{"key": "value"}' ...
{
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"key\": \"value\"}"
}
Form Data
curl -d 'username=john&password=secret' ...
{
"sendBody": true,
"specifyBody": "keypair",
"bodyParameters": {
"parameters": [
{ "name": "username", "value": "john" },
{ "name": "password", "value": "secret" }
]
}
}
Multipart Form
curl -F 'file=@document.pdf' -F 'name=My Doc' ...
{
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{ "name": "file", "value": "={{ $binary.file }}" },
{ "name": "name", "value": "My Doc" }
]
}
}
Using n8n Expressions
After importing, replace hardcoded values with n8n expressions:
Reference Previous Node Data
{
"jsonBody": "{{ JSON.stringify($json) }}"
}
Use Workflow Variables
{
"url": "https://api.example.com/users/{{ $json.userId }}"
}
Environment Variables
{
"headerParameters": {
"parameters": [
{ "name": "Authorization", "value": "Bearer {{ $env.API_TOKEN }}" }
]
}
}
Technical Details
| Specification | Value |
|---|---|
| AI Model | None (custom parser) |
| Processing | Client-side JavaScript |
| n8n Version | HTTP Request v4.1 |
| Output | Valid n8n JSON |
| Export | Copy to clipboard |
Common Use Cases
API Integration Workflows
Quickly add API calls to your n8n automations:
- Find cURL example in API docs
- Convert to n8n node
- Import and connect to trigger
Webhook Response Actions
Convert webhook handling cURL examples:
# From Stripe docs
curl https://api.stripe.com/v1/payment_intents \
-u sk_test_xxx: \
-d amount=2000 \
-d currency=gbp
Migration from Scripts
Convert bash scripts with cURL to n8n workflows:
# Before: bash script
curl -X POST https://slack.com/api/chat.postMessage ...
# After: n8n workflow node
Testing APIs
Rapidly prototype API integrations in n8n environment.
Tips for Best Results
- Include all headers - Copy complete cURL with auth
- Use single quotes - Prevents shell interpolation issues
- Valid JSON - Ensure body is properly formatted
- Replace secrets - Use n8n credentials/variables after import
- Test before production - Verify in n8n before activating workflow
Limitations
- File uploads - Binary files need manual n8n binary handling
- OAuth flows - Use n8n's built-in OAuth credentials instead
- Complex auth - AWS Signature, OAuth2 flows need native n8n support
- Response parsing - Add Set node for response processing
Privacy & Security
- 100% client-side - No data sent to servers
- No storage - cURL commands not persisted
- No tracking - Input not logged
- Works offline - No internet required after page load
Security note: Replace sensitive tokens with n8n credentials or environment variables after importing. Don't commit credentials to version control.