Text Replacer
Free online tool to find and replace text in bulk. Supports case sensitivity, whole word matching, and regular expressions. Upload and download files.
Text Replacer
Drag a file or click to upload
TXT, HTML, CSS, JS, JSON, XML, MDEnter text and click Find to start
Enter the text to find and replace, then click the Find buttonWhat is Text Replacer?
Text Replacer is an online tool that allows you to quickly find specific text in a document and replace it with different text. You can paste text directly or upload a file to easily perform bulk text replacement tasks.
It offers various search options including case sensitivity, whole word matching, and regular expressions. You can preview changes before applying them to prevent mistakes. All processing happens in your browser, keeping your data private and secure.
Use Cases
- Code Refactoring – Batch rename variables, functions, or class names across your code
- Document Editing – Replace specific words or phrases in reports, contracts, or manuscripts
- Translation Post-Processing – Standardize terminology across translated documents
- Data Cleansing – Fix patterns in CSV files, log files, or data exports
- Template Customization – Replace placeholders with actual values in email templates or document forms
- Typo Correction – Fix recurring typos throughout an entire document at once
Key Features
- File Upload – Easily load various text files including TXT, HTML, CSS, JS, and JSON via drag & drop.
- Case Sensitivity – Search with case distinction. Useful when you need to differentiate between ‘Apple’ and ‘apple’.
- Whole Word Matching – When searching for ‘cat’, excludes ‘category’ and ‘concatenate’, finding only exact matches of ‘cat’.
- Regular Expression Support – Pattern-based searching for complex text matching. Great for finding emails, phone numbers, or other specific formats.
- Real-time Preview – See highlighted changes before replacing to prevent unintended modifications.
- Download Results – Save the replaced text as a TXT file for immediate use in subsequent work.
How to Use
- Enter Text – Type text directly or drag & drop a file to upload.
- Enter Find Text – Type the text you want to change in the ‘Find Text’ field.
- Enter Replace Text – Type the new text in the ‘Replace With’ field. Leave empty to delete the found text.
- Select Options – Choose case sensitivity, whole word matching, or regex options as needed.
- Find and Replace – Click ‘Find’ to preview, then click ‘Replace All’ to execute the replacement.
Search Options Explained
Case Sensitive
By default, searches are case-insensitive. Enable this option to treat ‘Hello’ and ‘hello’ as different text. Useful when changing only variables with specific casing in programming code.
Whole Word
Searches for exact words using word boundaries. For example, when searching for ‘log’:
- Whole Word OFF: Matches ‘log’, ‘login’, ‘catalog’
- Whole Word ON: Matches only ‘log’, excludes ‘login’ and ‘catalog’
Regular Expression (Regex)
Use regular expressions for pattern-based searching. This advanced feature allows you to find complex text patterns.
\d+– Matches one or more digits[A-Za-z]+– Matches words consisting of letters\w+@\w+\.\w+– Matches email address format
Frequently Asked Questions
What file formats can I upload?
We support text-based files including TXT, HTML, CSS, JS, JSON, XML, MD, CSV, and LOG. Binary files like images or PDFs cannot be uploaded.
Is my text sent to a server?
No, all processing is done in your browser and your text is never sent to a server. You can safely process personal information and sensitive data.
How do I use regular expressions?
Enable the Regex option, then enter a regular expression in the Find field. For example, use \d+ to find all numbers, or \S+@\S+\.\S+ to find email addresses.
Can I use ‘Whole Word’ and ‘Regex’ together?
These options are mutually exclusive. If you need whole word matching with regex, use (word boundary) directly in your pattern. Example: cat
How do I delete text instead of replacing it?
Enter the text you want to delete in the Find field and leave the Replace field empty. When you execute the replacement, the found text will be deleted.
Can I undo a replacement?
Yes, we support Undo and Redo functionality. You can undo up to 5 steps. Use the Undo/Redo buttons located above the Find/Replace buttons.