Text Tool

Updated: 05/23/2024 by Computer Hope

Free online text tool to help search and replace, add text, sort, and perform other common tasks with manipulating text. Although these can be done with regular expressions, this tool helps everyone regardless of their skill level or type of device. Paste the text you want to modify and then use one or more options to change the text.

Questions and answers relating to this text tool.

Is the text I entered stored?
No text entered is stored on Computer Hope or any other location. We respect your privacy and adhere to strict data confidentiality policies.

Is the text I entered shared?
No text entered is shared with any third party.

How can I enter even more text?
At this time, with this tool being free to all, we must have a limit on how much text can be processed at a time.

How can I provide feedback?
Use the Contact link at the top or bottom of the page.

Tip

If you only want statistics, paste your text and click Submit, no actions are required.

Insert example text: Lorem Ipsum - Poorly formatted text


Search:   Replace:  
Search is where to enter text you want to find in your text you're editing. Replace is the text you want to use as a replacement for the text in the Search box. If the replace box is left blank the search text is deleted. Use \t in the replace fields for a tab.
Search2:   Replace2:
Search2 and Replace2 are the same as the above Search and Replace feature. These boxes allow you to perform an additional search and replace at the same time.
Ignore case   Only replace once   Search each line individually
When Ignore case is checked text in the above search boxes ignore case and find matches that are either uppercase or lowercase.
When Only replace once is checked text entered in the search boxes is only matched once and if any other matches are found they are ignored.
Perform search by line instead of looking at all text as a whole. Helpful, if you have multiple lines separated by new lines and only want to find match if the Search text is on one line and not multiple lines.
Beginning of line   End of a line
If Beginning of line is checked, the Search text is only matched if it's at the beginning of the line.
If End of line is checked, the Search text is only matched if it's at the end of the line or the end of the text.
Replacement text:
Add text into the Replacement text box to replace any of the below matches with desired text. If Replacement text is left blank, matches are deleted. Adding a space replaces all matches with a space.
Replace all white space   Replace all extra spaces
When Replace all white space is checked all white space characters (spaces and tabs) are deleted or replaced by Replacement text.
When Replace all extra spaces is checked two or more spaces next to each other are deleted or replaced by Replacement text.
Replace tabbed space   Replace spaces
When Replace tabbed space is checked all tabs are deleted or replaced by Replacement text.
When Replace spaces is checked, any space created by the spacebar is deleted or replaced by Replacement text.
Replace space at start of line   Replace space at end of line
When Replace space at start of line is checked any spaces at the beginning of each line are deleted or replaced by Replacement text.
When Replace space at end of line is checked, any spaces at the end of each line are deleted or replaced by Replacement text.
Replace blank lines   Replace spaces with new lines
When Replace blank lines is checked any blank or empty line with no characters is removed or replaced by Replacement text.
When Replace spaces with new lines is checked, all spaces are replaced with new lines, making each word on its own line. Note: This option does not use the replacement text.
Replace all lowercase letters   Replace all uppercase letters   Replace all numbers
When Replace all lowercase letters is checked any lowercase character is deleted or replaced by Replacement text.
When Replace all uppercase letters is checked, any uppercase character is deleted or replaced by Replacement text.
When Replace all numbers is checked, any number is deleted or replaced by Replacement text.
Replace new line and returns   Replace returns   Replace new lines
When Replace new lines and returns is checked any new line and return is deleted or replaced by Replacement text.
When Replace returns is checked, only returns are deleted or replaced by Replacement text.
When Replace new lines is checked, only new lines are deleted or replaced by Replacement text.
Replace HTML tags   Replace URL's   Replace hyperlinks   Keep text
When Replace HTML tags is checked, any HTML tags is deleted or replaced by Replacement text.
When Replace URL's is checked, any URL (e.g., http://www.computerhope.com) is deleted or replaced by Replacement text.
When Replace hyperlinks is checked, any HTML hyperlink is deleted or replaced by Replacement text.
When Keep text is checked with Replace hyperlinks, any HTML hyperlink is deleted, however, the text describing the link is kept. Note: The Replacement text is not used when this option is checked.
Replace date and time stamps
When Replace date and time stamps is checked the script attempts to remove any date and time stamp in text or a log.
Replace everything before:   Replace everything after:
When text is entered into the before text box, all text up to the matched text is deleted ore replaced with the Replacement text. When text is entered into the after text box, all text after the matched text is deleted or replaced with the Replacement text.
Replace lines containing:   Don't do exact match
When text is entered into the Replace lines containing text box, each line is looked at and if it contains the text entered into this box the full line is removed or replaced with the Replacement text. By default the script looks for an exact match. If you check Don't do exact match it will not perform an exact match. In other words, when checked "comp" is matched in "computer."
Replace lines NOT containing:   Don't do exact match
When text is entered into the Replace lines NOT containing text box, each line is looked at and if it does NOT contain the text entered into this box the full line is removed or replaced with the Replacement text. By default the script looks for an exact match. If you check Don't do exact match it will not perform an exact match. In other words, when checked "comp" is matched in "computer."
Replace everything between: and
When text is entered into both boxes for Replace everything between, text between each match is deleted or replaced with the Replacement text.
Add at beginning of line:
When text is entered into Add at beginning of line, that text is added to the beginning of each line of text.
Add at end of line:
When text is entered into Add at end of line, that text is added to the end of each line of text.
Wrap text at characters
Enter a numerical value into the Wrap text at box to tell the script the point you want the text to wrap. For example, "100" would wrap text to the next line at the 100th character.
Sentence case   Proper case   Lowercase   Uppercase   Random case   Toggle case
When Sentence case is checked, each found sentence has proper capitalization added to the first word. Note: If punctuation is not found or the sentences cannot be identified the script cannot perform this function.
When Proper case is checked, each found sentence has proper capitalization added to the first word. Note: If punctuation is not found or the sentences cannot be identified the script cannot perform this function.
When Lowercase is checked, all uppercase characters are lowercased.
When Uppercase is checked, all lowercase characters are uppercased.
When Random case is checked, the capitalization of letters are randomly selected as either lowercase and uppercase.
When Toggle case is checked, the capitalization is toggled from the current setting.
Number each line
When Number each line is checked, each line has a numerical value at the beginning of the line.
When Sort alphabetic ascending is checked, each line is looked at and then sorted in ascending order.
When Sort alphabetic descending is checked, each line is looked at and then sorted in descending order.
When Sort numeric asending is checked, each line is looked at and then sorted in asending numerical order.
When Sort numeric descending is checked, each line is looked at and then sorted in descending numerical order.
When Delete duplicate lines is checked, each line is looked at and if a dulplicate line is found, it is deleted. Note: Blank lines are ignored. If you want remove or replace blank lines, also select the Replace blank lines option.