AnyNPC
Flags
Test String
Matches

Regex Tester

Free online regex tester and debugger with real-time match highlighting, capture groups visualization, detailed match information (position, length, group content), replacement testing, and JavaScript/PCRE flavor support. Features include flag toggles (global, case-insensitive, multiline, dotAll, Unicode), common regex library (email, URL, phone, IP, date), syntax error detection with clear messages, one-click copy pattern, and instant visual feedback as you type. All processing runs locally in your browser using native RegExp engine — no server uploads, works offline.

Features

  • Real-time match highlighting — see matches light up instantly as you type your pattern or test string
  • Capture groups visualization — all numbered and named groups displayed with their matched content in a structured table
  • Detailed match information for each match including exact position (index), length, and full match text
  • Regex flag toggles — switch between global (g), case-insensitive (i), multiline (m), dotAll (s), and Unicode (u) modes with one click
  • Replacement testing mode — test your replace patterns with $1, $2 back-references and see the result in real time
  • Common regex library — one-click load pre-built patterns for email, URL, phone number, IP address, date, password validation, and more
  • Syntax error detection with clear, human-readable error messages when your regex is invalid
  • Match count statistics — total matches found, total capture groups, and processing time displayed in the status bar
  • One-click copy pattern or matches to clipboard for quick sharing with teammates
  • Full JavaScript RegExp engine compatibility — uses the browser's native engine so results are identical to your production code
  • Entirely client-side processing — zero data transmission, works offline after initial load, perfect for sensitive data like passwords or PII

How to Use

  1. 1Enter your regular expression pattern in the "Pattern" field at the top. Use forward slashes (/pattern/) or enter the raw pattern without delimiters.
  2. 2Toggle the flags below the pattern field: g (global — find all matches), i (case-insensitive), m (multiline — ^$ match line boundaries), s (dotAll — dot matches newlines), u (Unicode — full Unicode support).
  3. 3Paste or type your test string in the input area below. Matches highlight automatically as you type.
  4. 4View detailed match information in the right panel: each match shows its position, length, captured groups, and the full matched text.
  5. 5Switch to Replace mode to test substitution patterns. Enter your replacement string with $1, $2 references to use capture groups.
  6. 6Click any preset pattern from the Common Patterns library to quickly load frequently-used regexes like email validation or URL matching.
  7. 7Copy the pattern or results using the toolbar buttons. Download matches as a text file if needed.

Frequently Asked Questions

Related Tools

Base64 Encode / Decode

Base64 encoder and decoder. Encode text to Base64 or decode Base64 back to readable text with real-time auto-detection. Supports UTF-8 characters including emojis, Chinese, and other non-Latin scripts. Features include drag-and-drop file upload, one-click copy, and download results as text files. All processing runs locally in your browser — your data never leaves your device.

URL Encode / Decode

URL encoder and decoder. Encode text to URL-safe percent encoding or decode percent-encoded URLs back to readable text. Supports UTF-8 characters including emojis, Chinese, and other Unicode scripts. Features include spaces-as-plus encoding for form data, uppercase hex option, drag-and-drop file upload, one-click copy, and download results as text files. All processing runs locally in your browser — your data never leaves your device.

JSON Formatter

JSON formatter, validator, and beautifier. Format, minify, pretty-print, and syntax-highlight JSON data instantly. Features include key sorting, custom indentation (2/4 spaces or tab), line numbers, tree view, error highlighting with line/column position, drag-and-drop file upload, one-click copy/download. All processing runs locally in your browser — no server uploads.

JWT Parser

JWT parser and debugger. Decode JSON Web Tokens instantly — view header, payload, and signature in readable format. Inspect registered claims (exp, iat, nbf, iss, sub, aud) with human-readable timestamps. Detects expired tokens, missing expiration, weak algorithms, and alg:none security issues. All processing runs locally in your browser — your tokens never leave your device.

Hash Calculator

Hash calculator supporting 25 algorithms — MD2, MD4, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512, SHA3-224, SHA3-256, SHA3-384, SHA3-512, Keccak-256, Keccak-512, BLAKE2b-256, BLAKE2b-512, BLAKE2s-256, BLAKE3, RIPEMD-160, SM3, Whirlpool, CRC32, Adler-32, xxHash32, and xxHash64. Compute hash digests of any text input in real time. Features include HMAC with a secret key, uppercase/lowercase hex output, hash verification against a known checksum, one-click copy, and download results. All hashing runs locally in your browser — your data never leaves your device.