Text Case Converter: Convert Between camelCase, snake_case, PascalCase & More
Programming languages and frameworks have strong opinions about naming conventions — JavaScript expects camelCase for variables, Python demands snake_case, CSS uses kebab-case for property names, and Java enforces PascalCase for class names. Mixing these conventions creates code that is technically correct but professionally unacceptable, and manually reformatting identifiers across a codebase is tedious and error-prone. Our text case converter transforms any input string between eight common case styles instantly. Paste a sentence, a variable name, or even a full block of identifiers, and convert them to the exact convention your project demands. The tool handles edge cases correctly: consecutive uppercase letters (e.g., "XMLParser" to snake_case becomes "xml_parser," not "x_m_l_parser"), number-word boundaries (e.g., "file2Name" to kebab-case becomes "file-2-name"), and multi-word transformations. Beyond individual developers, the converter is a valuable tool for teams standardizing naming conventions across a polyglot codebase, generating API documentation with consistent naming, and translating column names from SQL tables (which often use snake_case) to application-layer models (which may use camelCase).
Text Case Converter
Free · No registration
Step-by-Step Guide
Paste Your Text
Type or paste any text — a variable name, file name, heading, database column, or full paragraph — into the input field. The tool detects the original case style automatically and displays it above the input as a hint (e.g., "Detected: camelCase"). Multiple lines are processed individually and displayed in the output.
Select the Target Case Style
Choose from eight case styles using the button grid: camelCase (e.g., myVariableName), PascalCase (MyVariableName), snake_case (my_variable_name), kebab-case (my-variable-name), UPPERCASE (MY VARIABLE NAME), lowercase (my variable name), Title Case (My Variable Name), Sentence case (My variable name), and CONSTANT_CASE (MY_VARIABLE_NAME). A preview of the converted text updates in real time as you switch styles.
Copy, Download, or Batch Convert
Click "Copy" to copy the converted text to your clipboard. For bulk operations, paste a list of identifiers (one per line), select the target case, and download the result as a .txt file. The batch mode handles hundreds of identifiers at once — useful for refactoring entire codebases column by column.
Tips & Best Practices
JavaScript and TypeScript conventions: use camelCase for variables, functions, and object properties (myFunction, userName); PascalCase for classes and interfaces (UserController, ApiResponse); UPPER_SNAKE_CASE for true constants (MAX_RETRY_COUNT). ESLint and Prettier can enforce these automatically — configure them in your project and use the case converter to fix legacy code.
Python (PEP 8) mandates snake_case for variables, functions, and method names (calculate_total, database_url); PascalCase for class names (HttpClient); and UPPER_CASE for constants (API_VERSION). Python will not stop you from using camelCase, but your code will fail code review in any serious project.
CSS uses kebab-case for class names and properties (.main-header, background-color). JavaScript cannot use kebab-case directly because the hyphen is the subtraction operator, so CSS-in-JS libraries like React use camelCase for style objects (backgroundColor instead of background-color). Our converter bridges this gap instantly.
Java conventions: PascalCase for classes and interfaces (CustomerRepository, OrderService); camelCase for methods and variables (findById, customerName); UPPER_SNAKE_CASE for constants (static final fields). Java is strictly typed and convention-heavy — deviating from these norms makes your code confusing even if it compiles.
Databases (SQL) traditionally use snake_case for table and column names (order_items, created_at) because many database systems are case-insensitive and snake_case is the most readable in that context. When mapping ORM entities to application code, the converter can batch-transform all your column names to the target language convention.
API naming uses multiple conventions depending on the protocol. REST API JSON responses typically use camelCase (JavaScript convention, since JSON originates from JavaScript). GraphQL fields follow the schema-defined convention. gRPC uses PascalCase for service and method names. gRPC-Gateway JSON responses automatically convert to camelCase.
Title Case (used for headings) has competing standards — APA, Chicago, AP, and MLA each define different rules for which words to capitalize. Our converter follows the APA style (capitalize first and last words, all nouns, pronouns, adjectives, verbs, adverbs, and subordinate conjunctions; do not capitalize articles, coordinating conjunctions, and short prepositions unless they are the first or last word).
When converting from one case style to another, the converter preserves numbers and special characters intelligently. For example, "user2profile" to snake_case becomes "user_2_profile" — the number is treated as a word boundary. Acronyms are also handled: "parseXMLFile" converts to snake_case as "parse_xml_file," correctly detecting that "XML" is a single logical word.
Frequently Asked Questions
Consistent naming conventions reduce cognitive load, make code reviews faster, and prevent the subtle bugs that arise from mismatched casing across a polyglot stack. Our case converter handles all eight standard conventions, batch processing, and edge cases like acronyms and numbers — for free, in your browser. Start converting now.
Try this tool for free →open_in_new