Regex Tester

Test JavaScript regular expressions with live match highlighting, capture groups, named groups and replace preview. Includes a cheat sheet. Free and runs in your browser.

  1. Upload
  2. Options
  3. Download

How to: Regex Tester

  1. Enter a pattern and flags.
  2. Paste your test text – matches are highlighted live.
  3. Inspect groups or preview a replacement.

Regular expressions are powerful but easy to get wrong. This tester highlights every match as you type, lists capture groups and their positions, and previews search-and-replace results, so you can build and debug patterns for validation, parsing and text clean-up with confidence.

Common uses

Tips for best results

Flags explained

g finds all matches instead of only the first, i ignores case, m makes ^ and $ match at line breaks, s lets . match newlines, u enables full Unicode support including \p{…} classes, and y (sticky) matches only at the current position. The tester always searches globally for highlighting, but respects your flags for the replace preview.

Validating international data

Real-world data is global. Names include accents and non-Latin scripts, postcodes vary from 3 to 10 characters, and phone numbers have many formats. Use \p{L} for letters in any language, avoid overly strict patterns for names and addresses, and for phone numbers consider the international E.164 format: a plus sign followed by up to 15 digits.

Why use Fileopia for Regex Tester?

FileopiaTypical upload-based sites
What you type is sent to a serverNo – stays in your browserOften
Sign-up requiredNeverOften for bigger jobs
Hourly / daily task limitsNoneCommon on free plans
Works offline after loadingYes, for most toolsNo

Private by design

Everything you type is calculated by JavaScript in this tab. Nothing is sent to Fileopia or anyone else, and there are no accounts or tracking cookies tied to what you enter.

Frequently asked questions

Which regex flavour is used

JavaScript (ECMAScript 2024), which supports lookbehind, named groups, Unicode property escapes like \p{L} and the s (dotAll) flag. Most patterns also work in Python, PCRE, Java and .NET with small differences.

Why does my pattern match empty strings

Patterns using * or ? can match zero characters. Use + instead of * when at least one character is required.

Is Regex Tester really free?

Yes. Every tool on Fileopia is 100% free with no file limits, no sign-up and no watermarks. The site is supported by unobtrusive ads.

Are my files uploaded to a server?

No. Fileopia processes your files directly in your browser using JavaScript. Your documents never leave your device, so they stay completely private.

Does it work on mobile?

Yes. Fileopia works in any modern browser on Android, iPhone, iPad, Windows, Mac and Linux.

Other tools

JSON Formatter & ValidatorBase64 Encode & DecodeURL Encode & DecodeHash GeneratorUUID GeneratorHTML, CSS & JS MinifierColor ConverterMerge PDFSplit PDFRotate PDFAdd Page NumbersJPG to PDFPDF to JPGPDF to PowerPoint