Konverter Kasus
Konversi teks antara UPPERCASE, lowercase, Title Case, camelCase, Snake_case, PascalCase, dan kebab-case. Ini berjalan sepenuhnya di browser Anda — tidak ada data yang dikirim ke server mana pun, tidak perlu akun, dan sepenuhnya gratis.
The Complete Developer's Guide to Text Case Conventions
Text case conventions are one of the most fundamental — and most contentious — aspects of software development. Every programming language, framework, and platform has established naming conventions that developers are expected to follow. Using the wrong case convention can make your code harder to read, break linter rules, cause compilation errors, or simply mark you as a junior developer who hasn't learned the team's standards yet. This guide covers every major text case format, where each one is used, and why they exist.
Why Text Case Conventions Matter
Text casing conventions serve two critical purposes: human readability and machine parsing. Because most programming languages use whitespace as a syntax delimiter, spaces cannot be used inside variable names or function identifiers. Casing conventions are therefore the primary way to make multi-word identifiers readable. Choosing the right convention for the right context is a core professional skill.
The 10 Major Text Case Formats
1. camelCase
The first word is entirely lowercase, and each subsequent word begins with an uppercase letter. No separators are used.
Examples: firstName, getUserData, isUserLoggedIn
Where it's used: JavaScript variables and function names, Java variables and methods, Swift variables and functions, JSON property names (by convention), React component props.
2. PascalCase (UpperCamelCase)
Every word begins with an uppercase letter, including the first word. No separators are used.
Examples: UserProfile, GetUserData, HttpRequestHandler
Where it's used: Class names in virtually all OOP languages (JavaScript, TypeScript, Java, C#, Python), React component names, C# methods, TypeScript interfaces and types.
3. snake_case
All words are lowercase, separated by underscores.
Examples: user_first_name, get_user_data, max_retry_count
Where it's used: Python variables, functions, and module names (PEP 8 standard), Ruby variables and methods, database column names and table names (SQL), file names in Linux/Unix systems, WordPress PHP functions.
4. kebab-case (dash-case)
All words are lowercase, separated by hyphens.
Examples: user-profile, main-content, get-started-button
Where it's used: CSS class names and IDs, HTML data attributes (data-user-id), URL slugs (/blog/my-first-post), file names in web projects, npm package names, Lisp and Clojure.
5. UPPER_CASE / CONSTANT_CASE (SCREAMING_SNAKE_CASE)
All words are uppercase, separated by underscores.
Examples: MAX_RETRY_COUNT, API_BASE_URL, DEFAULT_TIMEOUT_MS
Where it's used: Constants and environment variables in virtually all languages (JavaScript, Python, Java, C, Go), configuration variables, enum values in C and Java.
6. dot.case
All words are lowercase, separated by dots.
Examples: user.profile.name, app.config.timeout
Where it's used: Configuration files (Java properties files, .env files sometimes), object property access notation in some languages, namespace conventions.
7. UPPERCASE
All characters are uppercase, no separators.
Examples: README, LICENSE, FAQ
Where it's used: Acronyms, filenames for documentation (README, CHANGELOG), abbreviations in programming (HTML, CSS, API, URL).
8. lowercase
All characters are lowercase, no separators.
Where it's used: Single-word file and directory names in Linux, HTML element names in HTML5, Git branch names (alongside kebab-case).
9. Title Case
The first letter of major words is capitalized (typically skipping articles and short prepositions).
Examples: "The Quick Brown Fox", "Getting Started With React"
Where it's used: Article and blog post titles, book titles, H1-H3 headings in documents, product names, UI button labels.
10. Sentence case
Only the first word is capitalized, plus proper nouns.
Examples: "This is a sentence.", "Getting started with React"
Where it's used: Body text, email subjects, UI labels in modern design systems (Google Material Design uses sentence case), tooltips, and form labels.
Quick Reference: Which Case for Which Context
- JavaScript variables/functions: camelCase
- JavaScript classes & React components: PascalCase
- Python variables/functions: snake_case
- Python classes: PascalCase
- CSS classes: kebab-case
- URL slugs: kebab-case
- Constants / env vars: CONSTANT_CASE
- Database columns: snake_case
- REST API endpoints: kebab-case (
/api/user-profile)
Use our free Case Converter to instantly transform text between all 10 case formats — perfect for renaming variables, generating URL slugs, or cleaning up copy-pasted code from a different coding style.
Cara Menggunakan Konverter Kasus
- 1
Enter your text
Type or paste any text into the input field at the top.
- 2
All conversions appear instantly
The tool simultaneously shows your text in UPPERCASE, lowercase, Title Case, camelCase, snake_case, PascalCase, kebab-case, and more.
- 3
Copy the format you need
Click Copy next to any format to copy just that version to your clipboard.
Pertanyaan yang Sering Diajukan
What case formats does this converter support?
The tool supports 10 formats: UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and dot.case.
What is camelCase used for?
camelCase is the standard naming convention for variables and functions in JavaScript, Java, and Swift (e.g., firstName, getUserData).
What is snake_case used for?
snake_case is the convention in Python, Ruby, and for database column names and file names (e.g., user_first_name, get_user_data).
What is kebab-case used for?
kebab-case is standard for CSS class names, HTML attributes, URL slugs, and file names in web projects (e.g., main-content, get-started).
Does it handle existing camelCase input correctly?
Yes. The converter detects camelCase transitions (e.g., "myVariableName") and correctly splits them when converting to snake_case, kebab-case, and similar formats.