Camel, Snake, Kebab Case Converter
Effortlessly convert text between camelCase, snake_case, kebab-case, PascalCase, and more for developers and writers.
Updated
What is the Camel, Snake, Kebab Case Converter?
Welcome to the Camel, Snake, Kebab Case Converter, your essential online utility for transforming text between various common programming and writing case formats. Whether you're a developer adhering to strict coding style guides, a writer preparing content for different platforms, or simply need to standardize text, this tool provides a fast, accurate, and comprehensive solution.
This converter supports a wide array of case styles, including:
camelCase:
myVariableNamePascalCase:
MyClassNamesnake_case:
my_variable_namekebab-case:
my-css-classCONSTANT_CASE:
MY_CONSTANT_VALUETitle Case:
My Document TitleSentence case:
This is a sentence.path/case:
path/to/filedot.case:
config.property.valueHeader-Case:
X-Request-ID
Designed with simplicity and efficiency in mind, our tool allows you to instantly convert single terms or entire multi-line documents. It intelligently detects the input case and offers all possible conversions, or lets you specify a target case for bulk operations. With no external dependencies or server-side processing, your data remains private and secure, processed entirely within your browser.
Streamline your workflow and maintain consistency across all your projects with this versatile case conversion utility.
How it works
The Camel, Snake, Kebab Case Converter operates entirely client-side within your browser, ensuring privacy and speed. The conversion process involves two primary steps: splitting the input text into individual words and then joining these words according to the rules of the target case.
1. Text Splitting
When you input text, the tool first analyzes it to break it down into its constituent words. This is a crucial step, as different case formats use different delimiters or patterns to separate words. For instance:
camelCase and PascalCase are split by identifying uppercase letters that mark the beginning of a new word (e.g.,
myVariableNamebecomesmy,Variable,Name). Special handling is applied to avoid splitting acronyms incorrectly (e.g.,myHTMLPageremainsmy,HTML,Page).snake_case and CONSTANT_CASE are split by underscores (
_).kebab-case and Header-Case are split by hyphens (
-).Title Case and Sentence case are typically split by spaces.
path/case and dot.case are split by slashes (
/) and dots (.) respectively.
This intelligent splitting mechanism ensures that the core words are accurately extracted, regardless of the original casing style.
2. Word Joining and Case Application
Once the words are isolated, the tool then reconstructs them into the desired target case. Each case type has specific rules for how words are joined and capitalized:
camelCase: The first word starts with a lowercase letter, and subsequent words start with an uppercase letter (e.g.,
myVariableName).PascalCase: All words start with an uppercase letter (e.g.,
MyClassName).snake_case: All words are lowercase and joined by underscores (e.g.,
my_variable_name).kebab-case: All words are lowercase and joined by hyphens (e.g.,
my-css-class).CONSTANT_CASE: All words are uppercase and joined by underscores (e.g.,
MY_CONSTANT_VALUE).Title Case: Each significant word starts with an uppercase letter, typically separated by spaces (e.g.,
My Document Title).Sentence case: Only the first word of the sentence is capitalized, with subsequent words in lowercase, separated by spaces (e.g.,
This is a sentence.).path/case: All words are lowercase and joined by slashes (e.g.,
path/to/file).dot.case: All words are lowercase and joined by dots (e.g.,
config.property.value).Header-Case: Each word starts with an uppercase letter and is joined by hyphens (e.g.,
X-Request-ID).
Single Term vs. Bulk Conversion
Single Term Mode: In this mode, the tool takes a single input string and displays its conversion across all supported case formats simultaneously. It also attempts to detect the original case of your input.
Bulk/Multi-line Mode: For larger texts or documents, this mode allows you to select a specific target case. The tool then processes each line independently, applying the chosen case conversion while preserving the line structure of your input.
By combining robust word splitting with precise case application rules, the tool delivers accurate and consistent results for all your text transformation needs.
Examples
Convert camelCase to snake_case
Transform a common programming variable name from camelCase to snake_case.
Convert kebab-case to PascalCase
Change a CSS class name or URL slug into a PascalCase component name.
Convert Sentence case to CONSTANT_CASE
Convert a regular sentence into an uppercase constant format, often used for enums or macros.
Frequently asked questions
What is camelCase and when should I use it?
What is camelCase and when should I use it?
camelCase is a naming convention where the first letter of the first word is lowercase, and the first letter of each subsequent concatenated word is capitalized, such as myVariableName. It is widely used in programming languages like JavaScript, Java, and C# for naming variables, functions, and methods.
What is the difference between snake_case and kebab-case?
What is the difference between snake_case and kebab-case?
Both snake*case and kebab-case are used to combine words without spaces, but they use different delimiters. snake_case uses underscores (*) to separate words (e.g., user_profile_data) and is common in Python and Ruby. kebab-case uses hyphens (-) to separate words (e.g., user-profile-data) and is frequently used in URLs, CSS class names, and HTML attributes.
Why do programmers use different case types?
Why do programmers use different case types?
Different programming languages and frameworks have established conventions for naming variables, classes, and files to maintain readability and consistency. For example, React components typically use PascalCase, while CSS classes use kebab-case. Using the correct case type ensures your code aligns with community standards and is easier for other developers to read and maintain.
Can this tool convert multiple lines of text at once?
Can this tool convert multiple lines of text at once?
Yes, the tool features a "Bulk / Multi-line" mode. When activated, you can paste multiple lines of text, select your desired target case, and the tool will convert each line individually while preserving the overall structure and line breaks of your input.
How does the tool handle acronyms during conversion?
How does the tool handle acronyms during conversion?
The converter uses an intelligent splitting algorithm designed to recognize common patterns. When converting from camelCase or PascalCase, it attempts to keep consecutive uppercase letters together to prevent acronyms from being split incorrectly (e.g., parseXMLData is split into parse, XML, Data rather than parse, X, M, L, Data).
Is my data sent to a server for processing?
Is my data sent to a server for processing?
No, your data is completely secure. The Camel, Snake, Kebab Case Converter operates 100% client-side within your web browser. No text or data is ever sent to an external server or API, ensuring your code and sensitive information remain private.
Related tools
More utilities you might find handy.
Base64 Encoder / Decoder for Text, Images & Docs
Instantly convert plain text, images, PDFs, and documents to Base64 strings or decode Base64 data arrays back into downloadable file assets.
Binary to Hex
Convert binary numbers to hexadecimal quickly with support for padding, two's complement, bit-widths, grouping and BigInt-sized inputs
CSV to JSON Converter
Convert CSV to JSON instantly in your browser – auto-detect delimiters, handle quotes and line breaks, create nested objects, and export clean JSON with zero uploads.