- All dev tools
- Regex tester
Regex tester
Write a regular expression and see every match highlighted as you type, with capture groups, named groups and a find-and-replace preview.
How to use the regex tester
- Type a pattern without the surrounding slashes, and pick the flags.
- Paste the text to test. Matches are highlighted and listed with their groups.
- Add a replacement such as $1 or $<name> to preview find-and-replace.
Questions
Which regex flavour is this?
JavaScript (ECMAScript), as used in browsers and Node.js. Most syntax matches PCRE and Python, but some features differ, such as possessive quantifiers, which JavaScript does not have.
What happens if my pattern hangs?
Patterns like (a+)+$ can take forever on some inputs (catastrophic backtracking). Matching runs in a background worker and is stopped after two seconds, with a message, instead of freezing your browser.
Is my data sent anywhere?
No. Everything runs in your browser with JavaScript. What you paste is never sent to a server, and the site's security policy stops the page from connecting to any other website. That matters for tokens, keys and customer data, which people paste into tools like this every day.
Related tools
- Diff checkerCompare two texts line by line.
- Case convertercamelCase, snake_case, Title Case…
- URL encode and decodePercent-encode text for URLs.
More developer tools
- JSON formatterFormat, validate and minify JSON.
- JSON to CSVTurn JSON arrays into a spreadsheet.
- CSV to JSONTurn a spreadsheet into JSON.
- JWT decoderRead a JWT and check its signature.
- Base64 encode and decodeText and files to and from Base64.
- Hash generatorMD5, SHA-1, SHA-256, SHA-512.
- Lorem ipsum generatorPlaceholder text on demand.
- Cron expression explainerCron schedules in plain English.
- Unix timestamp converterEpoch time to dates and back.
- UUID generatorRandom v4 and time-ordered v7 UUIDs.