MMaster Tools
DeveloperRuns on your device

Regex Tester

Test a regular expression against input text and see every match with its index and capture groups.

How it works

  1. 1

    Enter your regex pattern in the Pattern option field and any flags (like g or i) in the Flags field.

  2. 2

    Type or paste the string you want to test into the main input.

  3. 3

    Every match is listed with its character index and any capture groups.

Questions

What flags are supported?

All standard JavaScript regex flags: g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode), and v (unicodeSets). The g flag is added automatically so all matches are returned.

What happens with an invalid pattern?

The tool shows the exact error message from the JavaScript regex engine so you can fix the pattern without guessing.

How are named capture groups shown?

Named groups appear in a 'Named' line below each match, alongside the positional group list.

Is the test string sent anywhere?

No. Regex matching uses the browser's built-in RegExp engine. Nothing leaves your device.

JSON Formatter

JSON Formatter

Paste compact or messy JSON and get it back neatly indented with your chosen spacing.

JSON Minifier

JSON Minifier

Remove all whitespace and line breaks from a JSON document to shrink it as small as possible.

JSON Validator

JSON Validator

Check whether a JSON string is well-formed, and see the exact line and column of any syntax error.

JSON Beautifier

JSON Beautifier

Reformat JSON with sorted keys and readable indentation for easier reading and diffing.

JSON Tree Viewer

JSON Tree Viewer

Explore a JSON document as an interactive collapsible tree — expand and collapse any node.

XML Formatter

XML Formatter

Pretty-print XML with configurable indentation, preserving attributes, comments, and tag order.

XML Validator

XML Validator

Check XML for well-formedness and report every error with its line and column number.

YAML Formatter

YAML Formatter

Normalize and re-indent YAML, or convert it to JSON, with a configurable indent width.