Text Utility Tool
Text manipulation is one of those things that sounds simple until you're hand-editing a 500-line CSV to remove duplicates at 11pm. This tool handles the repetitive parts so you can move on.
Text Utility
Every text manipulation you need, in one place.
What's included
The tool is organized into sections: statistics, case conversion, line operations, extraction, and generation. Each section is independent โ you can paste text once and run multiple operations without clearing the input.
Statistics
- โWord count
- โCharacter count (with/without spaces)
- โLine count
- โSentence count
- โParagraph count
Case Conversion
- โUPPERCASE
- โlowercase
- โTitle Case
- โcamelCase
- โsnake_case
- โkebab-case
Line Operations
- โRemove duplicate lines
- โSort lines A-Z or Z-A
- โReverse line order
- โRemove blank lines
- โTrim whitespace per line
Extraction & Generation
- โExtract all email addresses
- โExtract all URLs
- โReverse text
- โLorem ipsum generator
- โCount word frequency
Counting words, characters, and lines
Word and character counts are among the most universally useful text statistics, and they come up more often than you'd expect. Writers working against a 1,500-word limit for a submission, developers checking whether a generated description fits within a 160-character meta description limit, content managers verifying that a tweet-length caption is actually under 280 characters โ all of these tasks benefit from instant counts that update as you type.
Word count is computed by splitting on whitespace and filtering out empty tokens, which handles multiple consecutive spaces and tabs correctly. The character count is available in two forms: with spaces (the raw length of the string) and without spaces (which excludes all whitespace characters). Without-spaces count is relevant for SMS pricing, some CMS field limits, and readability scoring algorithms that work on character density.
Line count reflects the number of newline-separated segments. Sentence count uses a heuristic that splits on sentence-ending punctuation followed by whitespace and a capital letter โ accurate for most well-formed prose but will miscount on lists, code, and informal writing. Paragraph count splits on blank lines (two or more consecutive newlines). These counts together give a quick structural overview of a document without having to read it.
The word frequency counter is particularly useful for content audits. Paste the body text of a page and see which words appear most frequently โ this surfaces accidental repetition (a word used 12 times in 800 words stands out immediately) and can confirm that target keywords appear with the right density. It also helps with translation preparation: knowing that a document contains 1,200 unique words with an average frequency of 3.5 gives a translator a quick complexity estimate.
Case conversion in practice
The case converters are smarter than a simple str.toLowerCase(). They understand word boundaries whether you're coming from spaces, existing camelCase, underscores, or hyphens. So you can take MyVariableName and convert it to my-variable-name in one click.
Different naming conventions are required in different contexts. JavaScript and TypeScript typically use camelCase for variables and functions and PascalCase (also called UpperCamelCase) for class names and component names. Python uses snake_case for variables and functions and PascalCase for classes. CSS class names and HTML attributes use kebab-case. Environment variables and constants in most languages use SCREAMING_SNAKE_CASE. When you're working across multiple contexts in a day โ writing a React component, a Python backend endpoint, a CSS module, and a REST API path โ you constantly need to translate between these conventions.
The tool handles the word-boundary detection that makes these conversions work correctly. When converting from camelCase to snake_case, it must identify that "userProfileData" has three words: "user", "profile", "data". It does this by splitting on transitions from lowercase to uppercase letters, on existing delimiters (underscores and hyphens), and on whitespace. The result is correct regardless of whether you start from a sentence, an existing camelCase identifier, an existing snake_case identifier, or a kebab-case slug.
Example: "user profile data"
| Format | Result |
|---|---|
| camelCase | userProfileData |
| PascalCase | UserProfileData |
| snake_case | user_profile_data |
| kebab-case | user-profile-data |
| SCREAMING_SNAKE | USER_PROFILE_DATA |
| Title Case | User Profile Data |
Find, replace, and whitespace operations
Find and replace is one of the most common text editing operations and is available here with both plain-text and regex modes. Plain-text mode is useful for straightforward substitutions: replacing every instance of an old domain name with a new one, swapping a product name after a rebrand, or correcting a systematic typo across a large block of text. Regex mode opens up pattern-based replacements โ removing all HTML tags, replacing multiple consecutive spaces with a single space, extracting phone numbers in various formats, or normalizing date formats from MM/DD/YYYY to YYYY-MM-DD.
Whitespace trimming operates at the line level: it strips leading and trailing spaces and tabs from each individual line, without touching the content of the lines themselves. This is the operation you need when data has been copy-pasted from a table or a PDF with extra spaces on each side, or when a CSV export from a legacy system pads fields with spaces to a fixed width. Trimming each line makes subsequent operations like duplicate removal and sorting work correctly โ otherwise " apple" and "apple" would be treated as two different lines.
A related operation is collapsing multiple consecutive spaces within a line into a single space. This is useful when pasting text from a PDF or a formatted document where word spacing has expanded into multiple spaces. The result is clean prose-style spacing throughout the text without any manual editing.
Line operations
These are the operations you'd normally reach for a shell script or a text editor with regex support. The duplicate removal is case-sensitive by default, with a case-insensitive option for when "Apple" and "apple" should count as the same line.
Removing duplicate lines is a daily need when working with lists of any kind. Email lists that have been collected from multiple sources and merged, lists of tags or keywords that have been assembled over time, configuration files that have accumulated repeated entries, log files where the same error appears thousands of times โ in all these cases, deduplication is the first step toward a clean dataset. The case-sensitive option matters here: if your list contains both "ERROR" and "error" and they represent the same thing, case-insensitive deduplication collapses them. If they are genuinely different (perhaps one is a severity level and the other is a literal string), you want case-sensitive deduplication to keep both.
Sorting lines alphabetically is indispensable for canonical ordering. Sorted lists of keywords, sorted CSS class names, sorted import statements, sorted configuration keys โ all of these make diffs cleaner (additions and removals appear in a predictable location rather than wherever someone happened to add them), reduce the cognitive load of scanning the list, and prevent the "where did I put that?" problem. The tool supports both A-Z and Z-A alphabetical sort, and a numeric sort mode for lists of numbers where lexicographic order would be wrong (10 sorts before 2 lexicographically but after 2 numerically).
Reversing line order is useful when a list is in chronological order but you want newest-first, or when a stack trace or log snippet was copied in the wrong direction. It is also occasionally useful for certain algorithm implementations where reversing the input is part of the processing step.
Remove duplicates
Keeps the first occurrence of each line, removes all subsequent repeats. Option to ignore case.
Sort lines
Alphabetical A-Z or Z-A, with numeric sort option for lines that start with numbers.
Trim whitespace
Strips leading and trailing spaces from each line. Useful for cleaning copy-pasted data.
Reversing text and creating slugs
Reversing text โ displaying characters in reverse order โ is useful in fewer but distinct situations: checking palindromes, working with bidirectional text issues, generating placeholder text that looks visually similar to real text but is clearly not readable, or simply satisfying curiosity about what a word looks like backwards. The reverse operation works character by character, preserving multi-byte Unicode characters correctly rather than reversing individual bytes which would corrupt emoji and accented characters.
Slugifying text converts a human-readable string into a URL-safe identifier. The slug format is what you see in blog post URLs, product page URLs, and API endpoint paths: lowercase letters, digits, and hyphens only, with spaces replaced by hyphens and everything else stripped or transliterated. "My Blog Post Title!" becomes "my-blog-post-title". "Cafรฉ au lait" becomes "cafe-au-lait" (with accented characters transliterated to their ASCII equivalents).
Slugs matter for SEO because the URL is one of the signals search engines use to understand what a page is about. A slug derived from the page title โ "how-to-make-sourdough-bread" โ is far more informative than an auto-generated numeric ID like "post-00847". Content management systems typically generate slugs automatically from titles, but when you're writing a CMS import script, migrating content between systems, or building a slug from programmatically assembled text, having a reliable slugify function at hand saves time.
Encoding, decoding, and special formats
URL encoding (also called percent-encoding) converts characters that are not safe in a URL into a %XX sequence where XX is the hexadecimal value of the character. Spaces become %20, ampersands become %26, and so on. You need this when constructing query strings manually, debugging API calls, or reading encoded URLs in log files. The decode operation reverses this โ turning https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world back into a human-readable URL.
Base64 encoding converts binary data (or any text) into a string of 64 ASCII characters. It is widely used for embedding binary content in text-based formats: data URLs in HTML and CSS, JWT tokens, HTTP Basic Authentication headers, and email attachments in MIME format. When you see a string like dXNlcjpwYXNzd29yZA== in an HTTP header, decoding it reveals the original text ("user:password" in this case). The tool's Base64 encode/decode handles both standard Base64 and URL-safe Base64 (which replaces + with - and / with _ to avoid conflicts with URL special characters).
HTML entity encoding converts characters like <, >, and & into their HTML entity equivalents (<, >, &). This is essential when embedding user-generated content in HTML โ failing to encode these characters creates cross-site scripting (XSS) vulnerabilities. When debugging rendered HTML by looking at raw page source, the decode operation makes the entity-heavy output readable.
Extraction and generation
Email and URL extraction
Paste a block of text โ a webpage's source, a CSV, a document โ and extract all email addresses or URLs in one click. Results are deduplicated and listed one per line, ready to copy. The URL extractor handles http, https, and ftp schemes.
Real-world uses include pulling contact emails from a scraped page before loading it into a CRM, extracting all links from a document to audit broken URLs, harvesting URLs from a log file for further analysis, and cleaning up email lists exported from legacy systems where emails are embedded in prose rather than isolated in their own field. The deduplication ensures that even if an address or URL appears twenty times in the source text, it appears once in the output list.
Lorem ipsum generator
Choose how many words, sentences, or paragraphs you need. The generated text uses the classic lorem ipsum word list, so it looks realistic in mockups without reading as real content. Good for populating database seeds, testing UI layouts, or filling placeholder fields.
The lorem ipsum text โ derived from a passage in Cicero's "de Finibus Bonorum et Malorum" from 45 BC โ has been the standard typographic placeholder for centuries. It is intentionally scrambled so that readers focus on the visual layout rather than the content, which is exactly what you want when testing typography, font sizes, line heights, and text wrapping in a UI component. Generating precise amounts (exactly 50 words for a card description, exactly three paragraphs for a content block) lets you match the real content dimensions you're designing for.
Real use cases for writers and developers
Writers and content creators reach for this tool in predictable ways. The word count and character count update in real time as you type, which is more convenient than submitting text to a form or waiting for a word processor to update its status bar. The word frequency counter catches overused words that a spell checker would miss โ it's perfectly valid English to use "however" fifteen times in a thousand-word article, but it reads poorly. Title case conversion saves time when formatting article headings, product names, or chapter titles that need consistent capitalization.
Developers encounter a different set of text problems. Renaming a variable across multiple conventions โ converting API response field names from snake_case to camelCase before passing them to a frontend component โ is a constant need in full-stack work. Building a migration script that reads a list of table names and generates corresponding file names, class names, and route paths requires exactly these conversions. Generating test data (email addresses, Lorem ipsum content, large lists of values) can be done without leaving the browser.
Data cleaning tasks sit at the intersection of both audiences. Receiving a list of tags from a client where some are in UPPERCASE, some in Title Case, and some in lowercase, all with inconsistent spacing โ normalizing this list takes seconds with lowercase conversion, trim whitespace, and remove duplicates applied in sequence. Taking a dump of configuration keys and sorting them alphabetically before committing them to a repository makes the diff smaller and the file easier to maintain.
Common workflows
Paste draft โ check word count against limit โ use word frequency to spot overused terms โ title-case the heading.
Paste list of DB column names โ convert snake_case to camelCase โ copy into TypeScript interface.
Paste copied column of values โ trim whitespace โ remove duplicates โ sort โ paste cleaned list into spreadsheet.
Generate 3 paragraphs of Lorem Ipsum โ paste into Storybook story โ check text overflow at different container widths.
Paste URL-encoded query string from logs โ decode โ read the actual parameters being passed.
Privacy: why processing locally matters
Most online text tools โ word counters, case converters, duplicate removers โ send your text to a server for processing. This is often done for simplicity (server-side code is easier to write for some operations) or to collect data for training AI models. Either way, the text you paste into the tool is transmitted over the network and stored, even temporarily, on a third-party server.
For text that contains no sensitive information โ a draft blog post, a list of public product names โ this may not matter. But consider the common cases where it does: pasting a client's email list to deduplicate it (the emails are PII), pasting a document containing employee names and salaries to get a word count (the document is confidential), pasting a configuration block that contains API keys or database credentials (catastrophic if logged), or pasting proprietary technical documentation before it has been published.
This tool processes everything in JavaScript running in your browser tab. When you paste text in, it stays on your machine. No network request is made for the text operations โ you can verify this by opening your browser's network inspector and confirming that no requests are sent when you paste text and click an operation button. When you close the browser tab, the text is gone. There is no account, no history, no analytics on the content you process.
This is the right default for a text utility. The operations themselves โ sorting, case conversion, regex matching, counting โ are all simple enough to run in milliseconds in a browser. There is no performance reason to involve a server, which means there is no tradeoff to make. Local processing is both faster (no network round trip) and more private (no data leaves the machine). It also means the tool works offline: once the page is loaded, all the operations continue to function with no internet connection.
Frequently Asked Questions
How does camelCase conversion work?
The converter splits your text on spaces, hyphens, and underscores, lowercases the first word, then capitalizes the first letter of each subsequent word. So 'my variable name' becomes 'myVariableName'.
Can it remove blank lines as well as duplicate lines?
Yes. The 'Remove duplicates' option has a secondary checkbox to also strip blank/empty lines from the output.
How does the email extractor work?
It runs a regex pattern against your pasted text and pulls out all strings matching the standard email format. Results are returned as a deduplicated list, one per line.
Does the tool send my text to a server?
No. All processing happens entirely in your browser using JavaScript. Your text is never sent to any server, stored anywhere, or logged. Closing the tab discards everything.
What is a slug and how does slugify work?
A slug is a URL-friendly version of a string โ lowercase, spaces replaced with hyphens, and all special characters removed. For example, 'My Blog Post Title!' becomes 'my-blog-post-title'. Slugs are used in page URLs, API endpoints, and file names.
Related Articles & Guides
Text Utility Tools Every Developer and Writer Needs
Text manipulation is one of those tasks that sounds trivial until you're doing it at scale. Renaming 200 JSONโฆ
Read guide โArticleText Utility Tool: Word Count, Case Converter, Sort Lines & More
Count words, convert case to camelCase/snake_case, remove duplicates, sort lines, and generate Lorem Ipsum.
Read guide โBlogHow to Encrypt & Decrypt Text Online: Security Guide
Encryption is one of the most powerful tools available for protecting information, and it is more accessibleโฆ
Read guide โ