Text Case Converter
Transform text between camelCase, snake_case, kebab-case, and more โ instantly.
ALL CAPS
all lowercase
Each Word Capitalized
First letter capitalized
firstWordLowerRestUpper
EachWordUpperCase
words_with_underscores
words-with-hyphens
UPPER_WITH_UNDERSCORES
words.with.dots
Complete Guide to Text Case Conversion for Developers
Naming things is one of the hardest problems in computer science โ and once you have decided on a name, you still need to format it correctly for each context. JavaScript wants camelCase. Python wants snake_case. CSS wants kebab-case. Database columns might use snake_case while API responses use camelCase. Environment variables scream in CONSTANT_CASE. Converting between these formats manually is tedious, error-prone, and a waste of developer time.
ToolsFree.org provides a free text case converter that transforms input into ten common formats simultaneously, updating in real time as you type. Everything runs locally in your browser. This guide explains each naming convention, when to use it, and how to integrate case conversion into your development workflow.
Why Naming Conventions Matter
Consistent naming conventions make code readable, searchable, and maintainable. When every variable in a JavaScript file uses camelCase and every Python module uses snake_case, developers can scan code quickly and predict how names are formatted. Linters and style guides (PEP 8 for Python, Airbnb for JavaScript, Google Style Guides) enforce these conventions automatically.
Problems arise at system boundaries. A PostgreSQL database stores column names in snake_case. A Laravel API might transform them to camelCase for JSON responses. A React frontend consumes camelCase props. A CSS stylesheet references kebab-case class names. Converting between these formats accurately during integration prevents subtle bugs where "user_id" in the database becomes "userId" in JavaScript but accidentally "userid" or "User_Id" due to manual conversion errors.
camelCase: The JavaScript Standard
camelCase starts with a lowercase letter; each subsequent word begins with uppercase. Examples: getUserById, isLoggedIn, totalPrice, fetchApiData. It is the standard convention for variables, functions, and methods in JavaScript, TypeScript, Java, Swift, Kotlin, and C# (for private members).
JSON APIs predominantly use camelCase for property names, following JavaScript conventions. When you receive snake_case data from a Ruby or Python backend and need camelCase for a frontend, automated conversion prevents mapping errors. Our converter detects word boundaries from spaces, underscores, hyphens, and capital letter transitions to produce correct camelCase output.
PascalCase: Classes and Components
PascalCase capitalizes the first letter of every word, including the first word. Examples: UserProfile, HttpResponse, PaymentGateway, JsonFormatter. It is used for class names, React and Vue component names, TypeScript interfaces, and enum types.
In React, component file names typically match the PascalCase component name: UserProfile.tsx exports UserProfile. In C# and Java, PascalCase is standard for all public members. When converting database table names (often snake_case or lowercase) to class names, PascalCase is the target format.
snake_case: Python, Ruby, and Databases
snake_case uses lowercase letters with underscores between words. Examples: user_profile, max_retry_count, created_at, is_active. PEP 8 mandates snake_case for Python variables, functions, modules, and package names. Ruby follows similar conventions. PostgreSQL and MySQL column names traditionally use snake_case.
REST APIs built with Django, Flask, or Rails often serialize JSON in snake_case. When integrating these APIs with camelCase frontends, you need reliable conversion at the boundary. Manual conversion of large schemas is impractical โ automated tools prevent the typo that creates user_name on one side and userName on the other when the database column is actually user_full_name.
kebab-case: CSS, HTML, and URLs
kebab-case uses lowercase letters with hyphens between words. Examples: user-profile, nav-bar-item, btn-primary, font-size-large. It is the standard for CSS class names, HTML data attributes, URL slugs, and npm package names.
CSS identifiers cannot contain uppercase letters in some contexts and hyphens are natural word separators in HTML. BEM (Block Element Modifier) methodology extends kebab-case with double underscores and double hyphens for component architecture. URL slugs for SEO-friendly pages use kebab-case: /blog/json-formatting-guide. JavaScript variable names cannot use hyphens (minus operator), making kebab-case exclusively a CSS, HTML, and URL convention.
CONSTANT_CASE: Configuration and Environment Variables
CONSTANT_CASE (also SCREAMING_SNAKE_CASE) uses all uppercase letters with underscores. Examples: MAX_RETRY_COUNT, API_BASE_URL, DEFAULT_TIMEOUT, DATABASE_CONNECTION_STRING. It signals values that should not change during runtime.
Environment variables (.env files) universally use CONSTANT_CASE. Docker, Kubernetes, CI/CD pipelines, and cloud platform configuration all follow this pattern. When converting application settings to environment variables, CONSTANT_CASE is the target format. Linux shell environment variables are traditionally uppercase as well.
Title Case and Sentence Case for Content
Title Case capitalizes the first letter of each major word โ used for headings, article titles, book names, and UI labels. Sentence case capitalizes only the first word โ used for body text, descriptions, tooltips, and error messages. These prose formats matter for content management, documentation, and user interface copy.
When generating UI strings from code identifiers, converting snake_case database field names to Title Case produces human-readable labels: created_at becomes "Created At" for a table column header. Sentence case is appropriate for longer descriptions and help text.
How Word Boundary Detection Works
Our converter identifies word boundaries from multiple signals: spaces, underscores, hyphens, dots, and transitions from lowercase to uppercase letters (camelCase/PascalCase boundaries). Acronym handling splits "XMLParser" into ["XML", "Parser"] by detecting consecutive uppercase letters followed by lowercase. Numbers are preserved as part of words: "user2fa" becomes "user_2fa" in snake_case.
Edge cases exist. Very short inputs (single words) convert cleanly across all formats. Already-formatted input converts correctly โ snake_case input produces the same snake_case output plus all other formats. Mixed separators ("user-name_v2") are normalized during tokenization.
Case Conversion in Development Workflows
API integration: Paste a response field name, get all formats, use the one your layer needs. Database migrations: Convert PascalCase model names to snake_case table and column names. CSS generation: Convert JavaScript component props to kebab-case CSS custom properties. Documentation: Convert code identifiers to Title Case for readable prose.
For bulk conversion of entire schemas (dozens or hundreds of fields), consider automated code generation tools or IDE refactoring features. This converter excels at quick, one-off conversions during active development โ the moment you need to translate a field name between layers.
Format by language/framework
- JavaScript/TypeScript: camelCase variables, PascalCase classes
- Python: snake_case everything (PEP 8)
- CSS/HTML: kebab-case classes and attributes
- Java/C#: camelCase fields, PascalCase classes
- SQL: snake_case columns and tables
- Env/config: CONSTANT_CASE keys
All supported output formats
- UPPERCASE โ all caps text
- lowercase โ all lowercase text
- Title Case โ Each Word Capitalized
- Sentence case โ First word only
- camelCase, PascalCase, snake_case
- kebab-case, CONSTANT_CASE, dot.case
Frequently asked questions
How are acronyms handled?
Consecutive uppercase letters followed by lowercase are treated as acronyms: "HTTPResponse" splits into "HTTP" and "Response". You may want to manually adjust acronym casing in the output for project-specific conventions.
Does it work with non-English text?
Yes. Unicode letters are supported. Case conversion follows standard Unicode rules for uppercase and lowercase transformation.
Is text sent to a server?
No. All conversion happens locally in your browser using JavaScript. Your input is never transmitted or stored.
Can I convert multiple lines at once?
The converter processes the entire input as a single string. For bulk line-by-line conversion, process each identifier separately or use a script for batch operations.