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:
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
Word Counter
Count words, characters, sentences, and paragraphs. Perfect for writers and students.
Case Converter
Convert text between uppercase, lowercase, title case, and sentence case instantly.
Morse Code Translator
Translate text to Morse code and Morse code to text. Supports letters, numbers, and punctuation.
Lorem Ipsum Generator
Generate placeholder text for designs and mockups. Choose paragraphs, sentences, or words.
Diff Checker
Compare two texts side by side. Highlight differences between documents, code, or strings.
Character Counter
Count characters with and without spaces. Real-time counts for tweets, meta descriptions, and forms.