Back to home Text Tools Find & Replace

Find & Replace

Find and replace text with regex support

How to use Find & Replace

Find and replace text with plain text or regular expressions (regex). Case sensitive option. Free online find and replace tool.

What is find and replace used for?

Find and replace is one of the most powerful text editing operations. Combined with regular expressions, it can perform complex transformations that would take hours to do manually.

Regex example: The pattern (\d{4})-(\d{2})-(\d{2}) with replacement $3/$2/$1 converts ISO dates (2025-04-10) to European format (10/04/2025) in one operation across the entire text.

Frequently Asked Questions

What is a regular expression (regex)?

A regular expression is a pattern that describes a set of strings. For example, \d+ matches one or more digits, \w+ matches a word, and .* matches any sequence of characters. Regex allows you to search for patterns rather than exact strings — vastly more powerful than literal text search.

What does the 'case sensitive' option do?

When enabled, 'Hello' and 'hello' are treated as different strings. When disabled, the search matches regardless of capitalization — 'hello' matches 'Hello', 'HELLO' and 'HeLLo'. Most text searches are case-insensitive by default.

How do I replace all occurrences, not just the first?

By default this tool replaces all occurrences. In JavaScript regex, the 'g' (global) flag is needed to replace all matches — the tool applies it automatically unless you specify otherwise.

Can I use capture groups in regex replacement?

Yes. Capture groups in the pattern (parentheses) can be referenced in the replacement with $1, $2, etc. For example, pattern (\w+) (\w+) with replacement $2 $1 swaps two words.

What is the difference between replace and substitute in different tools?

They are the same operation with different names. 'Replace' is used in most GUI tools and JavaScript. 'Substitute' (s/pattern/replacement/) is the term in sed and vim. 'gsub' is the global substitute in Ruby and Perl.

Browser find & replace vs code editor vs sed

A code editor (VS Code, Sublime Text) has the most powerful find & replace — supports multiline regex, file-wide search across a project, and preview before replacing. sed (Unix command line) is the most efficient for processing large files or piping text between commands. A browser-based tool like this one is ideal for quick operations on pasted text without opening any application — perfect for one-off replacements on small to medium text blocks.

☕ Buy me a coffee