Spoold Logo
/

String Case Converter

camelCase, snake_case, PascalCase, kebab-case, and more

Input

Guide: String Case Converter

↑ Back to tool

What is this tool?

This string case converter transforms text between 11 naming conventions: camelCase, PascalCase, snake_case, UPPER_SNAKE_CASE, kebab-case, Title Case, UPPERCASE, lowercase, Sentence case, dot.case, and path/case. In Single mode, paste any string and see all 11 conversions at once. In Bulk mode, paste multiple strings (one per line) and convert them all to a target case. The tool auto-detects the input format—whether camelCase, snake_case, space-separated, or mixed—and splits it into words before converting. Copy any single result, copy all, or copy with originals. All processing runs client-side.

Why use a case converter?

Naming conventions differ across languages and contexts: JavaScript uses camelCase, Python uses snake_case, CSS uses kebab-case, environment variables use UPPER_SNAKE, React components use PascalCase, and database columns vary. When renaming variables, converting API field names, writing documentation, or migrating between languages, you need to switch between conventions quickly and accurately.

For Developers

  • • Convert API field names between conventions
  • • Rename variables when switching languages
  • • Generate CSS class names from component names

Bulk Operations

  • • Convert a list of column names for migrations
  • • Batch-rename API response fields
  • • Quick copy with originals for documentation

Key features

  • 11 case formats — camelCase, PascalCase, snake_case, UPPER_SNAKE, kebab-case, Title Case, UPPERCASE, lowercase, Sentence case, dot.case, path/case.
  • Auto-detect input format — Automatically splits camelCase, PascalCase, snake_case, kebab-case, dot-separated, path-separated, or space-separated strings into words.
  • Word preview — Shows detected words below the input so you can verify the split is correct before copying.
  • Single mode — Paste one string and see all 11 conversions simultaneously. Copy any individual format with one click.
  • Bulk mode — Paste multiple strings (one per line). Select a target case and see all strings converted at once.
  • Quick copy as other case — In bulk mode, a grid of buttons lets you quickly copy all strings in any of the 11 formats without switching the target.
  • Copy individual or all — One-click copy for any single format, "Copy all" for every format as a list, or "Copy with originals" for a before→after table.
  • Handles edge cases — Correctly splits acronyms (e.g. XMLParserXML Parser) and mixed formats (e.g. myVariable_name).
  • 100% client-side — No data sent to a server. All processing runs in the browser.

How this tool works (step-by-step)

Single mode

  1. Type or paste a string — Enter a string in any naming convention (e.g. myVariableName, my_variable_name, My Variable).
  2. See detected words — The tool splits your input into words (shown below the input, e.g. my · variable · name).
  3. View all 11 formats — All conversions appear instantly in a list.
  4. Copy — Click copy on any row or use "Copy all" to get every format as text.

Bulk mode

  1. Switch to Bulk — Click the Bulk toggle at the top.
  2. Paste strings (one per line) — Enter multiple strings, each on its own line.
  3. Choose target case — Select the target naming convention from the grid of buttons.
  4. Review and copy — See all strings converted. Use "Copy all" (converted only), "Copy with originals" (before → after table), or the "Quick copy as other case" grid for instant access to all formats.

Conversion examples

InputCaseOutput
myVariableNamesnake_casemy_variable_name
myVariableNamekebab-casemy-variable-name
myVariableNamePascalCaseMyVariableName
myVariableNameUPPER_SNAKEMY_VARIABLE_NAME
user_first_namecamelCaseuserFirstName
get-all-itemsPascalCaseGetAllItems
ParseXMLDocumentsnake_caseparse_xml_document
MAX_RETRY_COUNTcamelCasemaxRetryCount
hello worldkebab-casehello-world
hello worlddot.casehello.world

Use cases

ScenarioHow this tool helps
API field mappingConvert between snake_case (Python/Ruby APIs) and camelCase (JavaScript frontend) when mapping response fields.
Database migrationsUse Bulk mode to convert a list of column names from camelCase to snake_case (or vice versa) for SQL migration scripts.
CSS class namesConvert between kebab-case (CSS), camelCase (CSS Modules), and PascalCase (React components).
Environment variablesConvert any variable name to UPPER_SNAKE_CASE for environment variable or constant naming.
DocumentationUse Title Case or Sentence case for headings and labels. Copy formatted names for README or wiki pages.

Best practices for naming conventions

  • Follow the language convention — JavaScript: camelCase. Python: snake_case. CSS: kebab-case. Ruby: snake_case. Go: PascalCase for exports. Using the standard convention makes your code idiomatic.
  • Be consistent within a project — Pick one convention per context (variables, functions, classes, constants) and stick with it. This tool helps you convert when you find inconsistencies.
  • Use UPPER_SNAKE for constantsMAX_RETRY_COUNT, API_BASE_URL, DEFAULT_TIMEOUT. This is a universal convention across most languages.
  • Check the word preview — Before copying, verify the detected words are correct. Acronyms and mixed formats may split differently than expected.
  • Use Bulk mode for batch renaming — When migrating field names (e.g. API response → database columns), use Bulk mode to convert all names at once and copy with originals for reference.

Common mistakes & how to avoid them

  • Acronyms splitting unexpectedlyXMLParser correctly splits to XML · Parser, but HTMLElement splits to HTML · Element. Always check the word preview for acronyms.
  • Numbers in identifiers — Names like user2name may not split at the number boundary. Add a separator (e.g. user2_name) for cleaner results.
  • Mixing conventions in the same project — Using camelCase in one file and snake_case in another creates confusion. Pick one and convert all existing names to match.
  • Forgetting language-specific rules — Go exports start with uppercase (PascalCase) while unexported symbols use camelCase. Python class names use PascalCase but functions use snake_case. The convention depends on both the language and the symbol type.

FAQ

Does it handle multi-word strings?

Yes. It splits by uppercase transitions (camelCase), underscores, hyphens, dots, slashes, and spaces. Even mixed formats like 'myVariable_name' are handled correctly.

Can I convert multiple strings at once?

Yes. Switch to Bulk mode, paste one string per line, choose a target case, and all strings are converted simultaneously. Use 'Copy all' or 'Copy with originals' to get the results.

Is this useful for CSS class names?

Absolutely. Convert between kebab-case (CSS), camelCase (CSS Modules/JS), and PascalCase (React components) instantly.

How does it handle acronyms?

The tokenizer recognizes uppercase sequences. 'XMLParser' splits to 'XML' + 'Parser'. 'parseHTTPResponse' splits to 'parse' + 'HTTP' + 'Response'.

What about single-character words?

Single characters are treated as words. 'a_b_c' converts to camelCase as 'aBC'.

Is my text sent to a server?

No. All conversion runs entirely in your browser. Nothing is uploaded.

Can I copy the results as a mapping table?

Yes. In Bulk mode, 'Copy with originals' gives you a tab-separated 'original → converted' table you can paste into a spreadsheet or document.

Is it free?

Yes. The string case converter is completely free with no sign-up required. All processing runs in your browser.

This tool is commonly searched as string case converter, camelCase to snake_case, naming convention converter, case converter online, snake_case to camelCase, kebab-case converter, PascalCase converter, text case changer, variable name converter, and identifier case converter. It supports 11 formats with auto-detection, single and bulk modes, and instant copy—all in the browser.

Similar tools

You might also find these developer tools useful:

Conclusion

A string case converter saves time when switching between naming conventions across languages, APIs, databases, and documentation. This tool supports 11 formats, auto-detects the input convention, offers both single and bulk modes, and handles edge cases like acronyms and mixed formats—all in the browser with no sign-up. Paste, see all conversions, copy—done.