Search

Jump to a tool or a page

Text case, sorted instantly

Switch between editorial and developer-friendly text formats, with live word and character stats as you go.

Live Editor Space

Transform Cases

Text Analytics

Characters00 (no spaces)
Words0total words
Sentences0approx. count
Reading Time0 minavg 200 wpm

A quick guide to text formatting

Consistent casing matters for code readability, editorial publishing, and database design. The right format helps systems parse text correctly and helps readers take it in easily.

Editorial formats

Use Sentence case for everyday writing and emails. Use Title Case for article headers and titles, following AP or Chicago style capitalization rules.

Programming standards

camelCase governs variables, PascalCase names classes, snake_case structures databases, and kebab-case slugifies URLs. Getting these wrong causes real bugs.

Naming conventions and case conversion

Which convention belongs where, why converting between them loses information that cannot always be recovered, and the locale edge case that quietly breaks case-insensitive comparison.

The conventions and where they belong

Naming conventions are arbitrary in isolation but load-bearing in practice. Most languages have a dominant style, and following it is what makes unfamiliar code readable. Fighting it produces code that works but reads as foreign to everyone else on the project.

  • camelCaseVariables and functions in JavaScript, Java, C#, Swift, and Kotlin. First word lowercase, subsequent words capitalised.
  • PascalCaseClasses, types, interfaces, and React components almost everywhere. Also the standard for methods in C#.
  • snake_caseVariables and functions in Python, Ruby, and Rust, and the conventional style for SQL table and column names.
  • kebab-caseCSS classes, HTML attributes, URL paths, npm package names, and command-line flags. Not usable as an identifier in most languages, because the hyphen parses as subtraction.
  • SCREAMING_SNAKE_CASEConstants and environment variables across nearly every language.

Why conversion is lossy

Converting between cases means splitting a string into words and rejoining them. The rejoining is trivial. The splitting is where information gets lost, because some formats do not record where the boundaries were.

Going from camelCase to snake_case is reliable, since every capital marks a boundary. Going the other way is fine too. But a round trip through a lossy step does not always return the original.

getHTTPResponse  →  get_h_t_t_p_response  →  getHTTPResponse ✗
                                        getHttpResponse ✓

Consecutive capitals are the usual culprit. Acronyms such as HTTP, URL, ID, and XML have no internal word boundaries, so a naive splitter treats each letter as its own word. Better converters special-case runs of capitals, which is why HTTPResponse becomes http_response rather than h_t_t_p_response, but the original capitalisation is still unrecoverable.

Title Case is not a single rule

Capitalising every word is straightforward but not what most style guides mean by title case. The common convention capitalises the first and last words, plus everything except short articles, conjunctions, and prepositions.

The exact list of exceptions differs between guides. Chicago, AP, and MLA disagree on where the cutoff sits, particularly for prepositions of four or more letters, so there is no single correct output.

For headings and titles this is worth doing by hand. For identifiers in code it is irrelevant, since the convention there is mechanical.

The Turkish dotless i

Case conversion depends on locale, and one case in particular breaks naive code. In Turkish, the uppercase form of i is a dotted capital I with a dot above, and the lowercase form of plain I is a dotless small i.

This means that lowercasing a string under a Turkish locale can produce a value that no longer matches an ASCII comparison, which has caused real bugs in configuration parsing and case-insensitive string matching.

"TITLE".toLowerCase()          // "title"
"TITLE".toLocaleLowerCase("tr") // "tıtle"  (dotless)

When comparing identifiers, protocol keywords, or anything else that is meant to be culture-neutral, use the invariant form your language provides rather than the locale-sensitive one. This tool operates on the invariant form.

Where casing crosses system boundaries

Most casing bugs appear at the seams between systems that follow different conventions. A JavaScript client uses camelCase, a Python service uses snake_case, and a Postgres database folds unquoted identifiers to lowercase.

The reliable approach is to convert once, at a single well-defined boundary, rather than sprinkling conversions through the code. A serialisation layer that maps between the wire format and the internal format keeps the rule in one place, and makes it obvious which side of the boundary any given name belongs to.

Postgres deserves particular care: unquoted identifiers are folded to lowercase, so a column created as userId is stored as userid. Quoting preserves the case but then requires quoting everywhere thereafter, which is why snake_case is the path of least resistance in SQL.

Slugs and URLs

Kebab-case is the standard for URL paths for practical reasons rather than aesthetic ones. Search engines have long treated hyphens as word separators and underscores as word joiners, so my-blog-post reads as three words while my_blog_post can read as one.

Producing a slug involves more than changing the separator. Text needs lowercasing, accented characters need transliterating or stripping, punctuation needs removing, and runs of separators need collapsing. Trailing hyphens left behind by stripped punctuation should go too.

Keep a stored slug stable once it is published. Regenerating slugs when a title is edited breaks every existing link, so the usual pattern is to generate once on creation and treat later changes as a deliberate redirect rather than an automatic rename.

Common questions

What is a case converter tool?

A case converter transforms the capitalization style of your text. It can switch plain text into editorial formats like Sentence case and Title Case, or programming formats like camelCase, snake_case, and kebab-case.

How does the smart Title Case converter work?

Unlike converters that capitalize every word, this one follows standard editorial guidelines: it capitalizes major words while keeping minor prepositions, articles, and conjunctions (like "a", "an", "the", "and", "of", "to") lowercase unless they open or close the text.

What are kebab-case and camelCase used for?

These formats matter in programming. camelCase and PascalCase are standard for variables and classes in JavaScript and TypeScript. snake_case is common for database columns, and kebab-case is ideal for URL slugs.

Is my text private when using this tool?

Yes. Every transformation runs in your browser via JavaScript. No text is ever sent to or processed by our servers.

Related tools

Other free tools that tend to come up in the same work.