Friday, November 6, 2026 · Asia/KarachiFree tools · No signup · Runs in your browser

Text Highlighter

The highlighter wraps each match of a word in double angle brackets and counts the hits. In “Red red rose” the word red matches twice, once with a capital, and the letters inside the brackets stay as they were.

New

The search ignores case and is literal. A dot is a dot. Zero hits leaves the text unchanged and says Hits: 0.

How to use

  1. Paste the text and type the word.
  2. Press Mark. Read the hit count, then the bracketed line.
  3. Reset restores Red red rose and the word red.

Formula / how it works

The mark. Each match is replaced by << and the exact matched letters and >>. Case is ignored while searching and preserved in the output, so Red stays Red inside the brackets. The hit count is the number of matches, not the number of words. Red red rose and red is Hits: 2. A search for rose in that sentence is Hits: 1. A search for blue is Hits: 0 and the sentence has no brackets. The pattern is escaped, so a word containing a dot does not become a wildcard. Angle brackets are visible in a plain field, which is the point. This is not Markdown bold and not a coloured span. A page that understands HTML will show the brackets as text because they are not a tag.

Limits. The text may be 5,000 characters and the word 40. An empty word is refused. Overlapping matches are not a special case. The search moves forward after each hit.

Red red rose with the word red marks both Red and red, because the match ignores case, and prints the original letters inside the brackets. Hits: 2. A word that never appears has Hits: 0 and the text unchanged except that no brackets were added. The brackets are angle brackets, not Markdown. A renderer will show them. That is the point: you can see the mark in a plain field. The search is a literal, not a pattern. A dot in the word is a dot, not “any character”. Two hundred characters is not the cap. The text cap is 5,000 and the word cap is 40.

Red and red are two hits because case does not matter, and both spellings survive inside the brackets. Rose is one hit and the two reds stay unmarked, which shows the word is the whole request and not a stem. Blue would be zero and the sentence would be unchanged. Use zero as a control when you are not sure the button ran. If the count stays zero and you can see the word, check the spelling in the word box, including a trailing space. The word is trimmed only by the need() rule if it is entirely blank. A trailing space makes it a different literal. Angle brackets were chosen because they are visible and they are not asterisks, so they do not collide with Markdown bold.

Two hits on red and one hit on rose are the controls. The sentence stays the same apart from brackets. If you change the word to Red with a capital, the count stays 2, because case is ignored, and the brackets still show the original spelling. That is the behaviour to show someone who thinks the tool rewrites case. It does not. It only marks. A zero from a word you can see means the word box does not match, often because of a space you did not notice.

Worked examples

Two reds

Inputs: Text: Red red rose | Word: red

Leave the text as Red red rose and the word as red, then press Mark. The hit count is 2.

Result: Word: red Hits: 2 <<Red>> <<red>> rose Angle brackets mark each hit. The letters of the hit are unchanged.

One rose

Inputs: Text: Red red rose | Word: rose

Keep the text Red red rose and change the word to rose, then press Mark. The hit count is 1.

Result: Word: rose Hits: 1 Red red <<rose>> Angle brackets mark each hit. The letters of the hit are unchanged.

Use cases

  • Marking a word in a sentence you will paste as plain text.
  • Counting case-insensitive hits.
  • Seeing that a missing word adds no brackets.
  • A literal search, not a pattern.

Tips & limitations

  • The letters inside the brackets keep their case.
  • A dot in the word is not a wildcard.
  • Hits: 0 means the text was not rewritten with brackets.
  • The word cap is 40 characters.

FAQ

Why does Red stay capital inside the brackets?

Search ignores case. The replacement keeps the letters that were actually there.

Is a dot a wildcard?

No. The word is literal. A dot matches a dot.

What does Hits: 0 look like?

The text is unchanged and no angle brackets are added.

Are the brackets HTML?

No. They are characters. A browser shows them as text.

Can the word be a phrase?

Yes, up to 40 characters, and the phrase is still literal.

Is the text uploaded?

No. The marks are added in the browser.

Runs entirely in your browser; your text is not uploaded. Counts and scores are heuristics, so review the output before you publish it.