Initializing, please wait a moment

Enter a pattern, tick the g, i, m, s, u, and y flags you need, paste your test text, and the matches light up in the panel below. Invalid patterns are flagged inline as you type, so you can fix a stray bracket or escape without leaving the page, and each match is broken out with its position, length, and capture groups.

Regex Tester Online


Regex Tester Online checks a regular expression against your sample text live in the browser: type a pattern, tick the flags you need, and every match highlights as you type. Each match shows its start position, length, and capture-group contents, so an empty group is easy to spot.

One-click starter patterns for email, URL, IPv4, phone, and date let you adapt a working expression instead of starting from a blank box - a pattern that looks right can still miss the strings you care about, so you confirm exactly what it catches before you paste it into code.

It is a read-only matcher: you supply the pattern and it shows live matches, rather than generating an expression for you or rewriting your text. Matching uses standard JavaScript regex syntax; your pattern and text never leave the browser tab.

Your pattern and text stay in your browser - no upload
Matching runs locally - your pattern and text never leave the browser tab.

Which flags to tick, and when

See four regex flags explained - g global, i case-insensitive, m multiline, s dotall.
g finds all matches, i any case, m makes ^ per line, s lets . match newlines.

The six flag boxes change how the same pattern behaves, and the defaults are not always what you want:

FlagWhat it changesTick it when
g globalLists every match in the text instead of stopping at the firstYou want to see all matches; untick it to just confirm the pattern matches at all
i ignore caseLetters match regardless of casecat should also catch Cat and CAT
m multiline^ and $ anchor to the start and end of each lineThe text has several lines and you anchor per line, not per block
s dotall. also matches across line breaksA single . should cross newlines
u unicodeEnables \p{...} property classes and astral charactersThe pattern includes Unicode property escapes or emoji
y stickyEach match must begin exactly where the previous one endedYou match contiguous tokens from a fixed position

Toggle any box and the highlight and the per-match breakdown refresh immediately, so the effect of a flag is visible without rerunning anything.


Where the regex tester fits in your workflow

A pattern rarely travels alone. Once it matches the way you want, paste two revisions of a config or log file into text diff to confirm only the lines you intended changed after a find-and-replace, or validate a JSON payload the pattern will run against in the JSON parser first. The developer tools hub collects the rest of the format, minify, and hash set, all running in-browser with no upload.

Back to Developer Tools

Related tools:

  • MD5 converter - Free online MD5 hash generator and MD5-to-text reverse lookup.
  • Convert PDF to TEXT online - Extract text from PDF online for copying and editing.
  • Text To HTML Editor - Text to HTML editor online - write in a WYSIWYG view and watch the generated HTML update live, with
  • CSS Gradient Animator Generator - CSS gradient generator - build animated linear gradients with live preview; copy ready-to-paste CSS
  • CSS Minifier - Minify CSS online for faster page loads.
  • CSS UnMinifier - CSS unminifier online - beautify minified CSS with proper indentation, line breaks, and readable
  • JavaScript Minifier - JavaScript minifier online free - paste your JS, click Minify, and copy the compressed code.
  • JSON Parser By Tree View - Paste JSON to validate, format, and view it in a tree.
  • JavaScript UnMinifier - JavaScript unminifier online - reformat minified JS with indentation and line breaks for
  • Keyboard Test - Keyboard test online - press each key to highlight it, spot non-working keys, and verify Num Lock,
  • Text Diff - Text diff online - compare two text blocks and highlight added, removed, and changed characters,
  • Developer Tools - Developer tools to parse JSON, minify or unminify CSS/JS, compare text, and generate MD5 hashes.

Tags: #developer

Related guides:

Loading reviews...

Frequently Asked Questions

What does Regex Tester Online do?

Test a regular expression against your own sample text and watch every match highlight as you type.

When should I reach for regex tester online?

Reach for it when a pattern is not catching what you expect and you want to confirm exactly which characters it matches before pasting it into code.

Are there starter patterns I can build from?

One-click starter patterns for email, URL, IPv4, phone, and date give you a working expression to adapt instead of beginning from a blank box.