Code Case Converter
Convert variables, database columns, API parameters, and CSS identifiers between camelCase, PascalCase, kebab-case, and snake_case with multi-line batch support.
How to Use the Code Case Converter
- Input your code identifiers or text: Paste single identifiers (e.g.
user_account_balance), space-separated words (e.g.get user profile), or an entire multi-line list of database fields into the editor. - Select your target programming convention: Click any of the four developer case
buttons:
camelCase,PascalCase,kebab-case, orsnake_case. - Verify the result: The editor converts every line independently, preserving your line count and indentation while transforming delimiters and letter casings.
- Copy or download: Click the Copy icon in the bottom toolbar to place the result on your clipboard, or click Download to save the converted list as a text file.
How Does the Identifier Tokenizer Work?
Converting programming identifiers is far more nuanced than simple string replacement. Different coding styles separate words using uppercase transitions, underscores, hyphens, dots, or spaces. ToolCanvas utilizes a specialized regex word-boundary tokenizer:
CamelCase Transition Detection: Detects boundary points between lowercase characters and
subsequent capital letters (e.g. fooBar splits into foo and Bar).
Acronym Boundary Handling: Correctly isolates acronym sequences followed by a capitalized
word (e.g. XMLHTTPRequest splits into XML, HTTP, and
Request instead of corrupting the acronym).
Universal Delimiter Parsing: Strips hyphens, underscores, dots, and whitespace, isolating the underlying semantic words before reassembling them into your chosen target convention.
Line-by-Line Independence: By treating each line as a distinct identifier, you can convert lists of 500 database attributes in one click without them collapsing into a single run-on token.
Programming Language Naming Standards
Standard casing conventions by programming language and software framework:
JavaScript & TypeScript- camelCase: Variable names, object properties, and function definitions (e.g.
getUserProfile,totalAmount). - PascalCase: Classes, interfaces, type aliases, and React components (e.g.
UserProfileCard,PaymentResponse). - kebab-case: npm package names and CSS class selectors.
- snake_case: Function names, methods, variables, and module filenames per PEP 8 (e.g.
calculate_tax,order_id). - PascalCase: Class names and exception types (e.g.
DatabaseConnection).
- PascalCase: Methods, public properties, classes, namespaces, and enums (e.g.
CalculateTotal,CustomerAddress). - camelCase: Private fields (often with underscore prefix) and method parameters.
- kebab-case: CSS classes, HTML data attributes (
data-user-id), REST API endpoints (/api/v1/user-settings), and Kubernetes resource names. - snake_case: SQL column names and PostgreSQL database tables.
The 4 Code Casing Styles Explained
- camelCase: The first word begins with a lowercase letter, and every subsequent word
starts with an uppercase letter. No spaces, hyphens, or underscores are used (e.g.
userId,paymentMethodType). - PascalCase: Every word begins with an uppercase letter, including the very first
word. No delimiters are used (e.g.
UserId,PaymentMethodType). Also known as UpperCamelCase. - kebab-case: All words are written in lowercase and joined by single hyphens (e.g.
user-id,payment-method-type). Also known as dash-case or spinal-case. - snake_case: All words are written in lowercase and joined by single underscores (e.g.
user_id,payment_method_type). Also known as underscore_case.
Best Practices for Code Identifiers
- Batch SQL Columns: When creating TypeScript types from SQL schemas, paste the column
list directly into the editor and click
camelCasefor instant property names. - Avoid Double Delimiters: The tokenizer strips redundant underscores or hyphens (such
as
user__profileororder--id), producing clean single-delimiter outputs. - Numbers in Variable Names: Numbers attached to words (e.g.
utf8Encodingorsha256Hash) are preserved without unwanted separation.
Real-World Transformation Examples
Common engineering scenarios tested across the converter:
created_at
billing_address_line_1
is_active_subscription
billingAddressLine1
isActiveSubscription
Why Developers Choose ToolCanvas
- 100% Client-Side Privacy: Zero cloud transmission. Proprietary company schemas, API models, and sensitive database column names never leave your workstation.
- Zero Latency: Runs directly inside your browser's V8 JavaScript engine for instant sub-millisecond conversions.
- Independent Multi-Line Processing: Formats hundreds of lines in one click without merging them into a single string.
- Clean Acronym Handling: Intelligently tokenizes uppercase abbreviations without corrupting multi-word sequences.
Supported Formats & Edge Cases
- Supported Delimiters: Spaces, tabs, underscores, hyphens, periods, and forward slashes.
- Mixed Casing Inputs: Handles SCREAMING_SNAKE_CASE, kebab-case, PascalCase, or ordinary English sentences.
- Numbers & Digits: Numbers in identifiers (e.g.
http2Client,v1ApiRoute) are preserved safely.
Yes. Paste your entire schema list into the editor. ToolCanvas processes each line independently, allowing you to convert 500 column names into camelCase or snake_case in under a millisecond without losing your list formatting.
Our tokenizer recognizes acronym sequences followed by a lowercase word (such as HTTPRequest)
and splits them properly into distinct tokens (Http and Request) rather than
treating the whole block as an unparseable word.
No. ToolCanvas operates under a strict client-side privacy architecture. All string processing occurs entirely in your browser's local memory. No text is sent to our servers, logged to disk, or shared with third parties.
In camelCase, the first letter of the first word is lowercase (e.g. userId). In PascalCase
(also known as UpperCamelCase), the first letter of the first word is capitalized (e.g.
UserId).
CSS is historically case-insensitive in HTML and uses hyphens (e.g. font-size,
border-radius) to improve human readability. In JavaScript, CSS properties are accessed via
camelCase (e.g. style.fontSize) because hyphens are interpreted as subtraction operators.
Complementary Developer Utilities
Explore our other free developer and text editing tools:
- Case Converter — Convert general prose between Sentence case, Title Case, UPPER CASE, and Capitalized Case.
- Duplicate Line Remover — Deduplicate database IDs, email rosters, or list exports.
- Text Cleaner — Strip HTML tags, remove invisible control characters, and clean messy strings.
- Text Compare & Diff Checker — Side-by-side visual diff tool to verify code revisions and document changes.