Get online today — Domain + Hosting at discounted prices View Combo Offers ›

Case Converter

Convert text to camelCase, snake_case, kebab-case, Title Case and more.

Paste text or an identifier to see it in every common case at once — camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case and the plain upper and lower forms.

Existing casing is understood rather than ignored: getHTTPResponse and get_http_response both split into the same words, so round-tripping between conventions does not mangle them.

How it works

Converting case is really two steps: work out where the word boundaries are, then re-join them in the target convention. The first step is where naive implementations fail.

Boundaries can be marked by separators (_, -, spaces) or by capitalisation alone. The awkward case is a run of capitals: getHTTPResponse should split as get / HTTP / Response, not get / H / T / T / P / Response. The rule is to break before the last capital in a run when a lowercase letter follows it — which this tool applies, so acronyms survive.

Where each convention belongs:

  • camelCase — JavaScript and Java variables and methods.
  • PascalCase — class names in most languages; also React components.
  • snake_case — Python and Ruby variables, and SQL column names.
  • kebab-case — URLs, CSS classes, HTML attributes and file names. Note it is invalid as an identifier in most languages, because the hyphen parses as subtraction.
  • CONSTANT_CASE — constants and environment variables.

Title Case here follows editorial convention rather than simply capitalising everything: minor words such as a, the, of and to stay lowercase unless they are the first or last word. That is the rule most style guides use, and it is what makes a heading read naturally.

Frequently asked questions

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase starts lowercase (userName); PascalCase starts uppercase (UserName). Convention is camelCase for variables and functions, PascalCase for classes and types.

Why does my acronym get mangled elsewhere?

Most converters split on every capital, so getHTTPResponse becomes get_h_t_t_p_response. Correct handling breaks before the last capital of a run when a lowercase letter follows, giving get_http_response. This tool does that.

Which case should I use for URLs?

kebab-case. Hyphens are treated as word separators by search engines while underscores are not, so my-page-title reads as three words and my_page_title reads as one.

Why is kebab-case not used for variable names?

Because the hyphen is the subtraction operator in nearly every language, so my-variable parses as "my minus variable". It is fine in CSS, HTML attributes, URLs and file names, which are not parsed as expressions.

How does Title Case decide what to capitalise?

Minor words — articles, short prepositions and conjunctions — stay lowercase unless they are first or last. So "The Rise of the Machines", not "The Rise Of The Machines". This matches most editorial style guides.

Does it handle accented characters and other scripts?

Yes. Conversion is multibyte-aware throughout, so accented Latin, Cyrillic and Greek text change case correctly rather than being stripped or corrupted.

Related tools

Need hosting that just works?

Free SSL, daily backups and 24×7 support on every Loudhost plan.

View Hosting Plans