QuickFreeTools

Online Highlight Regexp Matches in Text

Wrap all regex matches in HTML <mark> tags. Enter a JavaScript regex pattern; every match is highlighted. Client-side only.

Hello <mark>123</mark> world <mark>456</mark>.

Preview:

Hello 123 world 456.

Frequently Asked Questions

What regex flavor?
JavaScript (ECMAScript) regex. Use standard syntax: character classes [], quantifiers + * ?, groups (), alternation |. No lookbehind in older browsers.
Global flag?
The tool typically uses the g (global) flag so that every match in the text is highlighted, not just the first.
Output?
Output is HTML with <mark> around each match. Non-matching text is escaped so the result is safe to use in HTML.

Related Text Tools