Regex Tester
Test regular expressions and highlight matches in real time.
Automatically escape regex metacharacters in a string for safe use in patterns.
In regular expressions, characters like . * + ( carry special meaning as metacharacters.
When you use user input or external data directly in a regex pattern without escaping, those characters can cause unexpected matches or errors. Regex Escape automatically escapes all metacharacters so the string is treated as a literal value.
In standard mode, all regex metacharacters are escaped: . * + ? ^ $ { } [ ] ( ) | \ /. Inside character class mode, only ] \ ^ - / are escaped. Literal mode uses the same set as standard.
Standard is for use in a general pattern context. Inside [ ] class is for content placed inside a character class. Literal string match escapes everything so the result matches only the exact input string.
In JavaScript, a forward slash delimits regex literals (/pattern/). Escaping it makes the output safe for both regex literal and new RegExp() usage.
No. All processing happens entirely in your browser.