String Helper Tools
Formatting
Case
Transform
About Text Tools
Text Comparison
Compare two text documents and find differences instantly. Choose between line-by-line, word-by-word, or character-by-character comparison modes. Perfect for code review, document versioning, and content analysis.
Regex Validator
Test and validate regular expressions with real-time matching. Includes 20+ common patterns for email, phone, URL, and password validation. Browse the metacharacter reference and flag options to build complex patterns.
String Helpers
Transform text with one click - trim whitespace, change case, reverse text, add line numbers, and more. Get instant character, word, and line counts for your text.
Browser-Based Processing
All text processing happens entirely in your browser. Your data never leaves your device, ensuring complete privacy and security.
Frequently Asked Questions
What is the difference between line, word, and character comparison modes?
Line mode compares text line by line, ideal for code review and configuration files. Word mode compares individual words, best for documents and prose. Character mode compares letter by letter, useful for finding typos and precise text validation.
How do I compare two text files online?
Paste your first text in the left panel and second text in the right panel. Click "Compare Text" to see differences. Added lines show in green, removed lines in red. Use different comparison modes based on your needs.
What is a regular expression (regex)?
A regular expression is a pattern that describes a set of strings. It uses special characters like . (any character), * (zero or more), + (one or more), and character classes like \d (digits), \w (word characters) to match text patterns.
How do I validate an email address with regex?
Click on the "Email" pattern in our Common Patterns section. It loads the pattern automatically. The email regex matches the format: username@domain.extension with proper validation for each part.
What do regex flags g, i, m, and s mean?
g (global) finds all matches, not just the first. i (case-insensitive) ignores uppercase/lowercase. m (multiline) makes ^ and $ match line starts/ends. s (dotall) makes . match newline characters too.
How do I match a phone number with regex?
Click "Phone (US)" in Common Patterns. It matches formats like (555) 123-4567, 555-123-4567, and +1 555 123 4567. The pattern handles optional country code, parentheses, dashes, and spaces.
What is the difference between * and + in regex?
* matches zero or more occurrences, while + matches one or more. For example, a* matches empty string, "a", and "aa", but a+ requires at least one "a" - it matches "a" and "aa" but not empty string.
How do I use regex to find URLs in text?
Click "URL" in Common Patterns. The pattern matches both http and https URLs, including optional www prefix, domain, and path. Enable global flag (g) to find all URLs in a text.