Free browser tool

Regex tester, right in your browser

Type a pattern, paste some text and see every match at once, with its groups and the line it was found on. Try a replacement in the same place. It uses the JavaScript pattern language of your browser, so read the note under the tool if your pattern comes from another language.

Your files never leave your PC. The pattern and the text are used by code running inside this tab and are never sent to a server. Files you open for Search in files are read on this PC only. You can check this yourself: load the page, turn off your internet connection, and it still works.

How it works

  1. 1

    Type a pattern

    Write it between the slashes and switch the flags on or off. A pattern with a mistake shows what is wrong, in plain words.

  2. 2

    Paste your text

    Paste the text to search, or change the sample. Matches are marked as you type and listed with their groups and line numbers.

  3. 3

    Replace or explain

    Type a replacement to see the changed text, then copy it. With Pro, Explain describes the pattern in plain English and Search in files runs it over many files.

Questions

Is it really free?

Yes. Live matching, groups, replace and the syntax warnings are free on up to 100 KB of text, with no sign-up. Pro adds Explain mode, saved patterns and Search in files.

Which regex language does it use?

The JavaScript one, the same engine your browser uses for web pages, so a result here is what JavaScript code would give. Other languages such as .NET, PCRE, Python and Java share most of the basics but differ in details, for example \A and \Z, inline flags like (?i), possessive quantifiers and atomic groups. The page warns you when it sees such syntax. For another language, treat a result here as a good first check and not as proof.

What happens if my pattern never ends?

Some patterns, such as (a+)+$ on a long line of the letter a, try an enormous number of ways to match. Each run happens in a background thread and is stopped after about 2.5 seconds with a message, so the page does not freeze. Try a simpler pattern, or make parts of it more exact.

Is my text kept or sent anywhere?

No. The text is searched in your browser and is never sent to a server, and it is not saved. The only things kept are the patterns you save with Pro, and they stay in this browser until you delete them or clear the site data of your browser.

What can this page not do?

It works with the JavaScript pattern language and one text box of up to 100 KB. With Pro, Search in files reads files up to 5 MB each, but it does not open folders. The Windows app is not released yet, and it will work as a program on your PC without a browser.

The Windows app is coming soon

Tidy Regex tests regular expressions offline on your PC, with live matches and a plain-English explanation. Free to start, one-time Pro.

Windows app coming soon