What the text cleaner does
Paste text and apply one-click transformations: change case (UPPER, lower, Title Case), convert to programming cases (camelCase, snake_case, kebab-case), trim leading and trailing whitespace, collapse runs of spaces, and remove empty lines. It is for text that arrives messy — copied from a PDF, exported from a spreadsheet, pasted from a chat — and for turning headings, labels and identifiers into the format a system expects. Runs in your browser.
The operations
| Operation | Input | Output |
|---|---|---|
| UPPER CASE | hello world | HELLO WORLD |
| lower case | Hello World | hello world |
| Title Case | the quick brown fox | The Quick Brown Fox |
| camelCase | user first name | userFirstName |
| snake_case | User First Name | user_first_name |
| kebab-case | User First Name | user-first-name |
| Trim whitespace | text | text |
| Remove extra spaces | too many spaces | too many spaces |
| Remove empty lines | a\n\n\nb | a\nb |
Operations apply to the whole text; run several in sequence for a full clean (trim → collapse spaces → remove empty lines is the common order).
Where each case is used
| Case | Convention in |
|---|---|
| camelCase | JavaScript and Java variables and functions, JSON keys, Swift |
| PascalCase (UpperCamel) | Class names in most languages, React components, C# methods |
| snake_case | Python variables and functions, Ruby, Rust, database columns, environment variables (upper) |
| kebab-case | URLs, CSS classes, HTML attributes, file names, CLI flags |
| SCREAMING_SNAKE_CASE | Constants, environment variables |
| Title Case | Headings, book and article titles (style guides differ on small words) |
Common clean-up jobs
- PDF copy-paste — double spaces, line breaks mid-sentence and blank lines between every line. Remove extra spaces and empty lines, then rejoin.
- Spreadsheet exports — trailing spaces that break matching and deduplication. Trim.
- Column headers to field names — “Customer Email Address” to
customer_email_addressfor a database, orcustomerEmailAddressfor an API. - Shouting or all-lowercase text from forms — normalise case before display.
- Labels to identifiers — a list of menu items to kebab-case slugs or CSS class names.
Title Case details
The tool capitalises the first letter of every word, which is the simplest rule and what most people expect for a quick fix. Editorial style guides (AP, Chicago) keep short articles and prepositions lower — The Lord of the Rings rather than The Lord Of The Rings — and treat hyphenated words and acronyms specially. For publishing, apply the tool and then adjust the small words by hand.