Home/Developer Tools/Text Cleaner & Case Converter
🔡

Text Cleaner & Case Converter

FREE

UPPER, lower, Title, camelCase, snake_case, kebab-case; trim and collapse spaces

Free · No sign-up required
Loading...

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

OperationInputOutput
UPPER CASEhello worldHELLO WORLD
lower caseHello Worldhello world
Title Casethe quick brown foxThe Quick Brown Fox
camelCaseuser first nameuserFirstName
snake_caseUser First Nameuser_first_name
kebab-caseUser First Nameuser-first-name
Trim whitespace text text
Remove extra spacestoo many spacestoo many spaces
Remove empty linesa\n\n\nba\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

CaseConvention in
camelCaseJavaScript and Java variables and functions, JSON keys, Swift
PascalCase (UpperCamel)Class names in most languages, React components, C# methods
snake_casePython variables and functions, Ruby, Rust, database columns, environment variables (upper)
kebab-caseURLs, CSS classes, HTML attributes, file names, CLI flags
SCREAMING_SNAKE_CASEConstants, environment variables
Title CaseHeadings, 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_address for a database, or customerEmailAddress for 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.

Frequently asked questions

Does it handle accented and non-Latin characters?

Case changes work for any script that has case (Latin, Greek, Cyrillic). Scripts without case (Thai, Chinese, Arabic) are left unchanged. Programming-case conversion strips non-ASCII letters, as most identifier rules require.

How are numbers handled in camelCase?

Kept in place: 'version 2 beta' becomes version2Beta.

Can I convert from camelCase back to words?

Yes — convert to snake_case or kebab-case, which splits on the capitals, then replace the separators with spaces.

Will it remove tabs?

Trim removes leading and trailing tabs; 'remove extra spaces' collapses runs of spaces and tabs into one space.

Does it keep line breaks?

Yes, except for the 'remove empty lines' operation, which drops blank lines only. Line structure is otherwise preserved.

Is my text uploaded?

No. All transformations run in your browser.

More tools in this category

🔢
Word Counter
Count characters, words, sentences, paragraphs and lines
📄
Lorem Ipsum Generator
Generate placeholder words, sentences or paragraphs
Text Formatter & Minifier
Normalise spacing and blank lines, or collapse text to one line
👁
Bionic Reading Converter
Bold the start of each word as rich text or HTML
📋
JSON Tools
View tree, format, validate and minify JSON
📄
YAML Beautifier & Validator
Format YAML and find the line that breaks it