Text Case Converter
Enter any text and get instant conversions to all common naming conventions used in code.
helloWorldExample
HelloWorldExample
hello_world_example
hello-world-example
HELLO_WORLD_EXAMPLE
What is a text case converter?
A text case converter transforms text between the naming conventions used in programming. Every major language has a preferred convention for naming variables, functions, classes, and constants — and mixing conventions in a codebase makes code harder to read and violates style guides. This tool converts any phrase or identifier into all five common cases simultaneously so you can pick the one you need.
Naming conventions by language and context
The choice of naming convention is not arbitrary — each language community has established conventions that compilers, linters, and developers all expect:
- camelCase — first word lowercase, subsequent words capitalised:
getUserName. Used for: JavaScript/TypeScript variables and functions, Java variables and methods, Swift variables and functions, JSON property names in APIs. - PascalCase (UpperCamelCase) — every word capitalised:
GetUserName. Used for: C# classes, methods, and properties (Microsoft's .NET conventions), TypeScript interfaces and types, React component names, Python class names. - snake_case — all lowercase, words separated by underscores:
get_user_name. Used for: Python variables, functions, and module names (PEP 8), Ruby methods and variables, SQL column names, Django model fields, C/C++ function names in system libraries. - kebab-case — all lowercase, words separated by hyphens:
get-user-name. Used for: CSS class names and custom properties, HTML attributes, URL slugs, npm package names, command-line flags. - UPPER_SNAKE_CASE (SCREAMING_SNAKE_CASE) — all uppercase, words separated by underscores:
GET_USER_NAME. Used for: constants in Python (MAX_RETRIES = 3), environment variables (DATABASE_URL), C/C++ preprocessor macros, Java constants (static final).
How to use this tool
- Type or paste your text into the input field — it can be in any case format or plain words.
- All five case formats update instantly in the output panel.
- Click the copy icon next to the format you need.
Consistency matters more than preference
In a team project, consistent naming is more important than which convention you choose. Inconsistent naming — mixing getUserName with get_user_name in the same codebase — slows down code reading, makes autocomplete less useful, and causes subtle bugs when field names need to match an external format like a database schema or JSON API. Most teams enforce naming conventions automatically using linters: ESLint for JavaScript/TypeScript, pylint or flake8 for Python, dotnet format for C#, and stylelint for CSS.