Related developer tools
How to use
Use it in either direction depending on what you have:
- Select Regex → Text (default), paste your pattern (with or without
/.../flags). - Optionally enable stripping of
/.../flagsand^...$anchors. - Click Convert and copy the output.
- If you need the opposite, switch to Text → Regex to escape special characters so the regex matches your text literally.
FAQ
What does “Regex → Text” actually convert?
It unescapes escaped literals (like \. → .) and decodes common escapes like \n, \xHH, and \uXXXX; it does not generate matches for operators like .* or +.
Will it turn \d or \w into real text?
No—tokens like \d, \w, and backreferences are preserved because they are regex semantics, not literal characters.
Can I paste /pattern/gi and get just the pattern?
Yes—enable “Strip /.../flags” to remove delimiters and ignore the trailing flags.
What is \Q...\E support?
In engines that support it (like PCRE), \Q starts “quote literal mode” and \E ends it; the tool outputs the quoted content as plain text.
Why do I see a warning about regex operators?
If the pattern contains unescaped operators (groups, classes, quantifiers, alternation, etc.), the tool warns because the output can’t represent what the regex matches—only the literal parts.
Can I go from text to a regex that matches it literally?
Yes—switch to “Text → Regex” to escape regex metacharacters so the resulting pattern matches your text exactly.
Is my data sent to a server?
No. The conversion runs locally in your browser and the tool does not make network requests.