String Formatter Online
A free online string formatter that converts any text to camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, dot.notation, and path/case — all at once, instantly. Works with any input: spaces, underscores, hyphens, or existing camelCase. Nothing leaves your browser.
| Format | Result | Used in | |
|---|---|---|---|
| camelCase | — |
JS, Java, Swift, Kotlin, Go | |
| PascalCase | — |
Classes in most OO languages | |
| snake_case | — |
Python, Ruby, Rust, SQL columns | |
| SCREAMING_SNAKE | — |
Constants in most languages | |
| kebab-case | — |
CSS classes, HTML ids, URLs | |
| dot.notation | — |
Config keys, package names, Java pkgs | |
| path/case | — |
File paths, API routes, imports |
Need to reformat a whole column of identifiers?
We're building a bulk string formatter — paste 100 identifiers, get all formats at once. Drop your email and we'll notify you when it's ready.
String naming conventions explained
Every programming language and framework has conventions for how to write identifiers — variable names, function names, class names, constants, file names, CSS classes, and configuration keys. Using the right convention for the right context is important both for readability and because some tools and linters enforce these conventions automatically.
camelCase
Words run together with no separator; each word after the first starts with an uppercase
letter. The first letter is always lowercase. Used for variables and functions in
JavaScript (getUserById), Java (firstName), Swift, Kotlin,
Go, C#, and TypeScript. The most widely used convention in web development.
PascalCase (UpperCamelCase)
The same as camelCase but the first word also starts with an uppercase letter.
Used almost universally for class and type names across object-oriented languages:
UserAccount, HttpResponse, DatabaseConnection.
In C# and .NET, PascalCase is also used for public methods and properties.
snake_case
Words separated by underscores, all lowercase. The convention for variable and function
names in Python (get_user_by_id), Ruby, Rust, and PHP. Also widely used for
database column names (first_name, created_at) and file names
in many ecosystems.
SCREAMING_SNAKE_CASE
Like snake_case but in all uppercase. The universal convention for constants across
almost every language: MAX_RETRY_COUNT, API_BASE_URL,
DEFAULT_TIMEOUT_MS. Also used for environment variable names in shell
scripts, Docker, and configuration files.
kebab-case
Words separated by hyphens, all lowercase. The standard for CSS class names
(.nav-bar, .hero-section), HTML element IDs, URL slugs, and
HTML data attributes (data-user-id). Also used for package names in npm
and for file names in many JavaScript projects.
dot.notation and path/case
Dot notation is used for configuration keys (spring.datasource.url),
Java package names (com.example.myapp), and property accessors in some
languages. Path case uses forward slashes and appears in file system paths, API route
definitions (/api/users/profile), and ES module import paths.
How the string formatter parses your input
The formatter intelligently splits any input string into its component words before reformatting. It handles:
- Space-separated: "hello world" → ["hello", "world"]
- snake_case: "hello_world" → ["hello", "world"]
- kebab-case: "hello-world" → ["hello", "world"]
- dot.notation: "hello.world" → ["hello", "world"]
- camelCase: "helloWorld" → ["hello", "world"]
- PascalCase: "HelloWorld" → ["hello", "world"]
- SCREAMING_SNAKE: "HELLO_WORLD" → ["hello", "world"]
This means you can paste an identifier in any current format and get all seven target formats immediately — no manual pre-processing needed.
Frequently asked questions
What is the difference between camelCase and PascalCase?
Both join words without separators and capitalise the start of each word. In camelCase, the first word starts lowercase (helloWorld). In PascalCase, every word starts uppercase including the first (HelloWorld). camelCase is for variables and functions; PascalCase is for class and type names.
When should I use snake_case vs. kebab-case?
snake_case is for code identifiers in languages like Python and Rust, and for database column names. kebab-case is for CSS class names, HTML IDs, URL slugs, and file names in JavaScript projects. Both use lowercase words separated by a single character (underscore vs. hyphen), but they're used in different contexts.
What input formats does the string formatter accept?
Any format. The tool splits words by detecting spaces, underscores, hyphens, dots, forward slashes, and camelCase/PascalCase boundaries. You can paste an identifier in any existing format and the formatter will correctly extract the words and reformat to all seven targets.
Does it work for the "string formatter Java" use case?
Yes. For Java specifically, variable and method names use camelCase, class names use PascalCase, constants use SCREAMING_SNAKE_CASE, and package names use dot.notation (lowercase). This tool outputs all four simultaneously from a single input.
Is there a character limit?
No hard limit. The tool is optimised for single identifiers or short phrases (1–10 words), which is the typical use case. Very long inputs will still be processed, but string formatters are not generally used for multi-sentence text.
You might also need
All eight Shiftext tools, one click away: