How to use the Regex Tester tool
- Type your pattern without the surrounding slashes.
- Tick the flags you need and paste your test text.
- Check the highlighted matches and groups, and try a replacement.
Quick reference
| Pattern | Matches |
|---|---|
\d, \w, \s | A digit, a word character, a whitespace character |
. | Any character except a line break (or any character with the s flag) |
*, +, ? | Zero or more, one or more, zero or one |
{2,5} | Between 2 and 5 times |
^, $ | Start and end of the text (or of each line with the m flag) |
(…), (?:…) | A capture group, a group that isn’t captured |
[a-z], [^0-9] | Any character in the set, any character not in the set |
\b | A word boundary |
In the replace box, $1 inserts the first group and $& the whole match. To clean up text without writing a pattern, try Remove Line Breaks or Remove Duplicate Lines.
Frequently asked questions
Which regex flavor is this?
JavaScript (ECMAScript), the same engine your browser and Node.js use. Most syntax matches PCRE, Python and Java, but lookbehind and named groups behave the JavaScript way.
Why does my pattern freeze the page?
Patterns with nested repetition such as (a+)+ can take extremely long on some text. Simplify the pattern or make the repetition more specific.
Are my files uploaded to a server?
No. HushConverts converts everything with code that runs in your browser, so your text and files stay on your device. You can even use most tools offline once the page has loaded.
More encoding & developer
- Base64 EncodeTEXT → BASE64Turn any text into Base64.
- Base64 DecodeBASE64 → TEXTPaste a Base64 string to turn it back into normal text.
- Base64 to ImageBASE64 → IMAGEPaste a Base64 string or a full data:image URI to preview the image and download it as a file.
- Image to Base64IMAGE → BASE64Drop an image to get its Base64 in the format you need: a data URI, raw Base64, a CSS background rule or an HTML img tag.
- URL Encode / DecodeTEXT → URLMake text safe to put in a URL, or turn a percent-encoded string like %E2%9C%93 back into readable text.
- HTML Entity Encode / DecodeTEXT → HTMLEscape text so it displays literally in HTML, or decode entities such as &, < and © back into the characters they stand for.
- JSON Formatter & ValidatorJSON → JSONPaste JSON to pretty-print it, minify it, or find out exactly where it’s broken.
- JSON to CSVJSON → CSVTurn a JSON array of objects into a spreadsheet-ready CSV.