Home › Programmer & Developer Tools › RegEx Tester

RegEx Tester

Build and test JavaScript regular expressions in real time, see every match and capture group, and try replacements.

How to use RegEx Tester

  1. Enter your pattern and flags (g, i, m, …).
  2. Type or paste the test string below.
  3. Watch matches highlight live and inspect the capture groups.

Frequently asked questions

Can I test a find-and-replace?
Yes — enter a replacement string with $1, $2 group references to preview the output.

More Programmer & Developer Tools

  • JSON Validator — Validate, parse, and prettify JSON — load it from a URL or curl command, or convert a Python dict (single quotes, True/False/None) to JSON. Identifies syntax errors with precise line number reporting.
  • Code Beautifier — Automatically format your JavaScript, CSS, and HTML with customizable indentation and style rules.
  • Minifier — Reduce bundle sizes by removing whitespace, comments, and optimizing code structure for production.
  • SQL Formatter & Beautifier — Pretty-print and indent SQL queries across dialects (PostgreSQL, MySQL, T-SQL, BigQuery, and more) with configurable keyword casing.
  • XML Formatter — Beautify and validate XML with configurable indentation, or minify it to the smallest valid output — entirely in your browser.
  • JSON Diff — Compare two JSON objects (or Python dicts) structurally to spot added, removed, and changed keys — or switch to line and word mode for plain text and code.
  • Base64 Converter — Quickly encode and decode strings or files to Base64 format for safe data transmission.
  • URL Encoder / Decoder — Percent-encode or decode text, URLs, and query strings — with batch line mode and a parsed parameter breakdown.