CleanThisText guide

Convert code naming conventions

Check identifier boundaries before converting names into camel, snake, kebab, constant, and other styles.

Convert one identifier, not a source file

Naming Convention Converter treats the whole input as one name. Spaces, punctuation, underscores, case transitions, and letter-number boundaries separate words. Pasting an entire program does not safely rename its variables.

An acronym boundary is recognized separately from an ordinary capital. XMLHttpRequest2 handler becomes xml, http, request, 2, handler. Review brand spellings and acronyms because there is no project-specific vocabulary.

Match the convention to its destination

The result includes camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, and Title Case. A style suitable for a CSS class or URL is not necessarily a legal variable name: dashes and periods have special meaning in many languages.

Use Case Converter for uppercasing or lowercasing a whole sentence. Naming conversion lowercases recognized tokens before building each style, so deliberate capitalization is not preserved everywhere.

Update references with language-aware tooling

Use an editor's rename operation after choosing a name. A plain replacement can change strings, comments, unrelated identifiers, and external API keys that must keep their original spelling.

Check leading digits, reserved words, duplicate names, serialized fields, and public interfaces. Run the compiler and tests afterward. A naming suggestion does not prove a program remains valid.

Worked example

Input

XMLHttpRequest2 handler

Result

camelCase: xmlHttpRequest2Handler
PascalCase: XmlHttpRequest2Handler
snake_case: xml_http_request_2_handler
kebab-case: xml-http-request-2-handler
CONSTANT_CASE: XML_HTTP_REQUEST_2_HANDLER
dot.case: xml.http.request.2.handler
Title Case: Xml Http Request 2 Handler

The acronym and number boundaries are explicit. Rename the actual references in your editor.

Open Naming Convention Converter

For the next step

Simple hardware for an offline draft workflow.

Optional picks for moving paper notes into a file and writing through a revision.

MUNBYN portable scanner product photo

MUNBYN portable scanner

A handheld scanner option for bringing paper notes and pages into a digital workflow.

View on Amazon
GLENCREAG RK104 retro mechanical keyboard product photo

GLENCREAG RK104 retro mechanical keyboard

A full-size mechanical keyboard option for long cleanup, formatting, and writing sessions.

View on Amazon

As an Amazon Associate I earn from qualifying purchases.

All referenced CleanThisText tools process pasted text locally in browser memory. Read the privacy explanation.

Use the related tools