n8n node for powerful text find and replace operations with regex support
npm install n8n-nodes-text-replaceA powerful n8n community node for text find and replace operations with support for simple replacements, multiple replacement pairs, and regular expressions.
!n8n Text Replace Node - Simple Replace operation showing Hello replaced with Hi
Simple Replace: "Hello" → "Hi" transforms the input text

Watch the full demo on YouTube
- Simple Replace: Find and replace a single string
- Multiple Replace: Apply multiple find/replace pairs in sequence
- Regex Replace: Use regular expressions for advanced pattern matching
- Flexible Input Sources: Work with specific fields, all string fields, or custom text
- Options: Case sensitivity control, replace all or first occurrence only
1. Go to Settings > Community Nodes
2. Select Install
3. Enter n8n-nodes-text-replace and click Install
``bash`
npm install n8n-nodes-text-replace
Find and replace a single string in your text.
!Simple Replace operation in n8n Text Replace node
Replacing "Hello" with "Hi" in the input text
Parameters:
- Field Name: The field containing text to process
- Find: The string to search for
- Replace With: The replacement string
Example:
- Input: Hello World! Hello everyone!Hello
- Find: Hi
- Replace With: Hi World! Hi everyone!
- Output:
Apply multiple find/replace pairs in sequence. Each replacement is applied to the result of the previous one.
!Multiple Replace operation with sequential find and replace pairs in n8n
Applying multiple replacements: "Hello" → "Hi" and "World" → "Universe"
Parameters:
- Field Name: The field containing text to process
- Replacement Pairs: A list of find/replace pairs to apply in order
Example:
- Input: Hello World! Hello everyone!Hello
- Pairs: -> Hi, World -> UniverseHi Universe! Hi everyone!
- Output:
Use regular expressions for advanced pattern matching and replacement.
!Regex Replace with capture groups in n8n Text Replace node
Using capture groups to swap words: "Hello World!" → "World Hello!"
Parameters:
- Field Name: The field containing text to process
- Regex Pattern: The regular expression pattern to match
- Replace With: The replacement string (supports capture groups like $1, $2)
- Regex Flags: Optional flags (g = global, i = case-insensitive, m = multiline)
Example:
- Input: Hello World!(\w+) (\w+)!
- Pattern: $2 $1!
- Replace With: World Hello!
- Output:
The node supports three input sources:
| Source | Description |
|--------|-------------|
| Specific Field | Process a single named field from the input |
| All String Fields | Process all string fields in the input item |
| Custom Text | Process custom text (can use expressions) |
Controls whether matching is case-sensitive (enabled by default). The screenshot below shows Case Sensitive OFF, allowing hello to match Hello:
!Case insensitive text replacement in n8n workflow
Case Sensitive OFF: "hello" matches "Hello" in the input
Controls whether all matches are replaced (enabled by default). The screenshot below shows Replace All OFF, replacing only the first occurrence:
!Replace first occurrence only option in n8n Text Replace
Replace All OFF: Only the first "Hello" is replaced
When processing all string fields, this option includes fields in nested objects and arrays.
Instead of modifying the original field, output the result to a new field with a custom name.
An example workflow is included in the package. Import example-workflow.json` to see the node in action with all three operations demonstrated.
- Data Cleaning: Standardize text formats, remove unwanted characters
- Template Processing: Replace placeholders with actual values
- Content Transformation: Convert formats, update terminology
- Batch Text Processing: Apply consistent changes across multiple items
- Log Processing: Extract or transform patterns in log data
- Requires n8n version 1.0.0 or later
- Node.js 18.0.0 or later
Created by Toufik
If you find this node helpful, consider supporting its development:

Contributions are welcome! Please feel free to submit issues or pull requests on GitHub.