How to convert camelCase to snake_case
- In Names mode, paste one name per line and pick the case you want. The result updates as you type.
- To rename the variables inside a code snippet, switch to Code mode, choose snake_case or camelCase and click Convert variables.
- Copy the result. In Code mode, the list under the panels shows every rename and anything that was skipped.
Naming conventions by language
- Python:
snake_casefor variables and functions,PascalCasefor classes,CONSTANT_CASEfor constants (PEP 8) - JavaScript / TypeScript:
camelCasefor variables and functions,PascalCasefor classes and components - Java:
camelCasefor variables and methods,PascalCasefor classes,CONSTANT_CASEfor static finals - C / C++: no single standard —
snake_caseis common in C, and many C++ codebases usecamelCase. Match your project. - CSS classes and URLs: usually
kebab-case
Related guides
Frequently asked questions
How do I convert camelCase to snake_case?
Paste your names one per line in Names mode, choose snake_case and copy the result. To rename every variable inside a code snippet, switch to Code mode.
How are acronyms and numbers handled?
Acronyms are kept together, so parseHTTPResponse becomes parse_http_response. Digits stay with the word before them, so base64Encode becomes base64_encode.
Will Code mode break my code?
Code mode renames each variable everywhere it is used and never touches strings or attribute access like obj.someName. Names that are also keyword arguments or object keys, or that would clash with an existing name, are skipped and listed so you can decide.
Why aren't my function parameters renamed?
Callers outside your snippet may pass parameters by name, so renaming them could break code you didn't paste. Function names are only renamed if you tick the option, for the same reason.
Do I need an account?
No — you can use the free tools 5 times without one. After that, sign up or log in (it's free) for unlimited use of every tool.
Is my code stored?
No. Names mode runs entirely in your browser, and Code mode processes your code in memory without saving it. See our Privacy Policy.