JavaScript Regex Tester

Test JavaScript RegExp locally in a disposable worker with a 2-second timeout, bounded input and output, and explicit JSON truncation metadata. No upload.

  • Developer & Security
  • Runs in your browser
  • No upload
  • No third-party analytics or advertising

JavaScript Regex Tester

Paste or upload plain text up to 1 MiB UTF-8.
No upload for supported tools — the file is processed by this browser 1 MiB source; 4 KiB pattern; 100 capture groups

What this tool does

JavaScript Regex Tester applies a browser JavaScript RegExp to entered text and returns match positions, capture groups and named groups in JSON. Enter the pattern without slash delimiters and supply flags separately. JavaScript syntax and Unicode behavior can differ from PCRE, .NET and other engines.

Each run gets a fresh same-origin module worker. The main thread terminates that worker after two seconds, so catastrophic backtracking cannot keep the page blocked. Pattern and source are checked before the worker starts and again inside it. The result always states whether it was truncated and why.

Preservation and limits

Patterns are limited to 4 KiB UTF-8 and 100 capturing groups, flags to 8 characters and source text to 1 MiB UTF-8. JSON contains at most 1,000 complete matches and 8 MiB; match-limit or output-byte truncation is explicit and no partial match record is emitted.

The two-second worker deadline limits this tester, not the target application. A quick match is not a security audit, and JavaScript RegExp semantics can still vary by browser version. A timeout returns no partial output.

How to Use JavaScript Regex Tester

Use the supported inputs and settings described below.

  1. 1Choose the input

    Enter or choose up to 1 MiB of representative UTF-8 text, including expected matches and nonmatches.

  2. 2Check the settings

    Enter a JavaScript pattern of at most 4 KiB without surrounding slashes, then add only the flags required by the target runtime.

  3. 3Run the action

    Select Test regular expression. A disposable worker compiles and evaluates the pattern and is terminated if the run exceeds two seconds.

  4. 4Review the result

    Download the bounded JSON report. Check truncated and truncationReason before treating matchCount as complete, then retest the pattern in its destination application.

JavaScript Regex Tester questions

Answers about this specific workflow, not a promise for every file.

Does this tester use PCRE or .NET regex syntax?

No. It uses the browser's JavaScript RegExp engine. Retest syntax, flags and Unicode behavior in the system where the pattern will run.

Can a difficult pattern freeze the page?

The pattern runs outside the UI thread in a disposable worker. If it runs longer than two seconds, that worker is terminated and no partial result is returned.

How large can the pattern and report be?

A pattern can contain at most 100 capturing groups. The report contains at most 1,000 complete matches and 8 MiB. Its truncated boolean and truncationReason field identify match-limit or output-byte truncation.

Does a successful match prove the pattern is safe?

No. Test edge cases and destination performance separately. The worker deadline protects this page but does not change the target application's regex behavior.

Same source format, reverse conversions and relevant alternatives.

JWT Decoder

Developer & Security

Decode JWT headers and claims locally without uploading tokens. Free, no signup. This does not verify signatures or establish authorization; expiry uses the device clock.

Decode JWT

UUID v4 Generator

Developer & Security

Generate random UUID v4 identifiers locally and download a text list. Choose count, case and dash formatting. Free, no signup or data upload; no other UUID version is offered.

Generate UUIDs

Hash & HMAC Generator

Developer & Security

Generate supported text hashes or HMAC locally. No signup or upload. HMAC downloads contain the MAC and algorithm, never the key. Reset clears inputs and output.

Generate hash

Password Generator

Developer & Security

Generate random passwords locally with length, count and character controls. Free, no signup or upload. The JSON download contains the passwords; strength is only an estimate.

Generate passwords

QR Code Generator

Developer & Security

Generate a static SVG QR code from text or a URL locally. Choose error correction and margin. Free, no signup or upload; no destination lookup or verification.

Generate QR code