Regex Tester
Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.
Open toolEscape text so it matches literally in a regex pattern, a character class or a replacement string, for JavaScript, PCRE, Python, Java, .NET or POSIX.
Characters such as . * + ? ( ) [ ] { } ^ $ | and \ have special meanings in regular expressions. Paste any text — a file path, a price, a URL — and get it escaped so a pattern matches it exactly. Choose the regex flavour (JavaScript, PCRE/PHP, Python, Java, .NET, POSIX extended or basic) and where the text goes: in the pattern, inside a [character class], or in the replacement string, where $ and \ refer to captured groups.
Options escape / for JavaScript /…/ literals and make the result safe in free-spacing (x) mode. For JavaScript the escaped pattern is verified against your text with the browser’s own RegExp engine; for Java the \Q…\E quoted form is shown as well. Everything runs in your browser. Your data is never uploaded, logged or stored.
Your code or text
Pasted or opened from a file
Processed in this browser
Instant, in-browser. Nothing is uploaded.
Your result
Ready to download or copy
Paste the literal text.
Pick the regex flavour and where it will be used.
Copy the escaped result into your pattern.
Zero-upload architecture
Free, with no sign-up or watermark · Your files stay on your device
Launch the app and add your file. There is nothing to install and no account to create.
Pick the regex flavour and where it will be used.
Copy the escaped result into your pattern.
Test JavaScript regular expressions with live match highlighting, capture groups and replace preview.
Open toolBuild a regular expression step by step from text, character types, common patterns and groups, test it live and export it for JavaScript, Python or PHP.
Open toolEscape or unescape strings for JSON, JavaScript, Python, Java, C#, C, HTML, XML, URLs, CSV, SQL and shell.
Open toolPaste a regular expression and see every token, group, quantifier and flag explained in plain English, with syntax from other engines flagged.
Open tool