Code Case Converter

Share:
Developer Tools

Code Case Converter

Convert names between camelCase, snake_case, kebab-case & more

By Checked against sources by Last reviewed CODE STYLE DEVELOPER TOOLS NAMING CONVENTIONS STRINGS
Your browser is too old for this tool’s interactive features. Please update to Safari 13.1, Chrome or Edge 80, Firefox 74 or newer.

Code Case Converter

Acronyms
Words found
📅 Research current as of 16 Nov 2026 · Sources: Unicode Character Database 18.0.0 (UnicodeData.txt, SpecialCasing.txt); PEP 8; Google Java and JavaScript style guides; Microsoft .NET capitalization conventions; PostgreSQL 18 manual §4.1; POSIX.1-2024 ch. 8; RFC 3986 §6.2.2.1.
Standards, published formulas, and reference data are revised over time — check against a current authoritative source before relying on these figures.
Advertisement
After tool · AD-W1Responsive

How to Use the Code Case Converter

Type a name

A variable, a column, a label or a title, in any style and any script.

Check the split

Words found shows where the converter put the word boundaries.

Pick an acronym style

As words, in capitals, or Microsoft’s .NET rule.

Copy the form you need

A marked row will not convert back to the same words; it says why.

Advertisement
After how-to · AD-W2Responsive

One Name, Every Case

A name often has to cross contexts: a snake_case database column becomes a PascalCase model, a label becomes a CONSTANT_CASE environment variable, a title becomes a kebab-case URL slug. The converter does all eight forms at once, and the work is in the splitting. Before it can rebuild a name it has to find the words, whether they were separated by underscores, hyphens, dots, spaces or punctuation, or only by a change from lower case to a capital. “getHTTPResponse”, “get_http_response” and “Get HTTP Response” all give the same three words.

Those boundaries are read from Unicode’s letter categories, not from the 26 English capitals, so “résuméParser”, “ΟδόςΚαλή” and names in Cyrillic, Armenian or Deseret split the same way. Case changes use JavaScript’s locale-free toUpperCase() and toLowerCase(), which follow Unicode’s own case tables, and the first letter of each capitalised word takes its titlecase form, which differs from the capital for letters such as dž and fi.

Not every form survives the trip back. A capital can be longer than its letter (ß becomes SS), a capital can lower-case to a different letter (dotless ı becomes I, which comes back as i), and joining words without separators loses a boundary that no capital marks. The converter tests each form by splitting it again, marks the ones that do not give back the same words, and says why, so you know before you rename something whether the change can be undone.

The hard part of case conversion isn’t joining words — it’s splitting them, especially when acronyms and mixed separators are involved.

What style guides, SQL and Unicode’s case tables say about these names

01

Python (PEP 8): function and variable names are lowercase with underscores, class names use CapWords, and constants are written in capitals with underscores, such as MAX_OVERFLOW.

02

Java and JavaScript (Google’s style guides): methods and local variables are lowerCamelCase, classes are UpperCamelCase, and constants are all capitals with underscores.

03

.NET (Microsoft’s capitalization conventions): PascalCase for public members and types. A two-letter acronym keeps both capitals (IOStream); a longer one is cased as a word (HtmlTag). The “.NET rule” option above applies it.

04

SQL: PostgreSQL folds unquoted names to lower case, and its manual says this is incompatible with the SQL standard, which folds them to upper case. Either way user_name and USER_NAME name the same unquoted column.

05

Environment variables: POSIX names the variables its utilities use with capitals, digits and underscores only, never starting with a digit — the CONSTANT_CASE shape.

06

URLs: RFC 3986 makes the scheme and host case-insensitive and assumes the rest of a URL, path included, is case-sensitive unless the scheme says otherwise, so an all-lowercase kebab-case slug avoids two spellings of one page.

07

ß becomes SS: Unicode’s SpecialCasing.txt (18.0.0) calls SS the customary capital of ß. So CONSTANT_CASE turns straße_name into STRASSE_NAME, which can only come back as strasse_name.

08

Titlecase is not uppercase: for 136 characters in Unicode 18.0.0 they differ — the ligature fi titlecases to “Fi” but uppercases to “FI”, and dž to Dž rather than DŽ. This converter capitalises each word with the titlecase form.

09

Locale: JavaScript’s toUpperCase() uses Unicode’s locale-insensitive mappings, as this page does. Java’s no-argument toLowerCase() uses the default locale, and Oracle’s documentation warns that in a Turkish locale “TITLE” becomes “tıtle”.

Frequently Asked Questions

  • Eight: camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, dot.case, Title Case and Sentence case. You type once and see every form, each with its own copy button.
  • Any character that is not a letter, a combining mark or a number separates words, so spaces, underscores, hyphens, dots, slashes and other punctuation all count. Inside a name, a word starts at a capital that follows a lowercase letter, a digit or a letter from a script without capitals, and a run of capitals ends one letter before a capitalised word (HTTPResponse gives http and response). It works for any script with capitals: “résuméParser” gives résumé and parser, “ΟδόςΚαλή” gives οδός and καλή. The Words found row under the box shows exactly how your input was split.
  • Both join words without separators and capitalise each word. camelCase leaves the first word in lower case (myVariableName); PascalCase capitalises it too (MyVariableName). Google’s Java and JavaScript style guides use lowerCamelCase for methods and variables and UpperCamelCase for classes; Microsoft’s .NET conventions use PascalCase for public members and camelCase for parameters.
  • PEP 8 uses snake_case for Python functions and variables. In Python and JavaScript a hyphen is the subtraction operator, so my-name is read as my minus name and kebab-case is for places outside code: URL paths, CSS class names and file names. For SQL, note that PostgreSQL folds unquoted names to lower case while the SQL standard folds them to upper case, so in PostgreSQL user_name and USER_NAME are the same column unless quoted.
  • Capitals with underscores. PEP 8 and Google’s Java and JavaScript style guides all use it for constants (PEP 8’s examples are MAX_OVERFLOW and TOTAL), and POSIX uses the same shape — capitals, digits and underscores, not starting with a digit — for the environment variables its utilities read.
  • Choose one of three styles. As words (the default) gives getHttpResponse. In capitals keeps them as typed: getHTTPResponse. The .NET rule follows Microsoft’s capitalization conventions: a two-letter acronym keeps both capitals (IOStream), a longer one is cased as a word (HtmlTag), and a two-letter acronym that starts a camelCase name is all lower case (ioStream). An acronym here means two or more capitals in an input that also has lower case, so an all-capitals input such as GET_USER_NAME is read as ordinary words. Mixed-case acronyms cannot be detected: IPv6Address splits as i, pv6, address, so type it as ipv6Address or IPV6 address.
  • The converter splits each form again and checks it gives the same words. When it does not, the row is marked and says why. A number on its own (item_2_name) joins the word before it in camelCase (item2Name, which splits as item2 and name). Words in a script without capitals, such as Chinese or Thai, leave no boundary when joined. And some letters change when capitalised and do not come back: ß becomes SS and returns as ss, dotless ı becomes I and returns as i, and the micro sign µ becomes Greek capital Μ and returns as Greek μ.
  • Unicode’s default lower case of the dotted capital İ (U+0130) is i followed by U+0307 COMBINING DOT ABOVE, so “İstanbul” lower-cases to nine code points, not eight. SpecialCasing.txt gives a plain i only under its Turkish and Azerbaijani rules. Identifiers should not depend on the reader’s language, so the converter uses the default mapping and shows a note when your input contains İ.
  • Yes: take the kebab-case row. Punctuation is dropped and an apostrophe between letters is removed, so “What’s New? Café & Bar” becomes whats-new-café-bar. Accented and non-Latin letters are kept as they are, not transliterated, so remove accents yourself if your system needs an ASCII-only slug.
  • No. The splitting and rebuilding run in your browser, and nothing you type is sent, logged or stored.
  • Completely free, with no account or limit. What you enter is processed in your browser and is not sent to our servers.

Method & sources

How it computes

Splits the input into words, then rebuilds eight naming styles. Boundaries: any character that is not a letter, mark or number; a capital after a lowercase letter, digit or caseless letter; the last capital of a run before a capitalised word (Unicode properties, not A-Z). Case changes use JavaScript's locale-free toLowerCase/toUpperCase, and a capitalised word starts with its Unicode 18.0.0 titlecase. Each form is split again to report whether it converts back.

What this tool implements

  • Word boundaries use the Unicode Lowercase and Uppercase properties and the Lt, Lo and Nd categories rather than ASCII ranges: every one of Unicode 18.0.0's 1,471 clean case pairs gives a boundary before its capital and after its lowercase, and words starting with an astral letter (Deseret, Osage, Adlam) are capitalised by code point.
  • The first letter of a capitalised word takes its titlecase, which differs from its uppercase for 136 code points in Unicode 18.0.0 (UnicodeData.txt and SpecialCasing.txt): fi gives Fi, dž gives Dž, Georgian Mkhedruli is unchanged. The Turkish, Azerbaijani and Lithuanian rules are not applied, so İ lower-cases to i + U+0307, and the page says so.
  • Acronyms, the reader's choice: cased as words (the default), kept in capitals, or Microsoft's .NET capitalization conventions — two-letter acronyms keep both capitals (IOStream), longer ones are cased as words (HtmlTag), and a two-letter acronym that begins a camelCase name is lower case. An acronym is two or more capitals in an input that also has lower case; mixed-case acronyms such as IPv6 are not detected.
  • Every form is split again and compared with the input's words, and a form that does not give them back is marked with the reason: a digits-only word joins the previous word in camelCase, a caseless script leaves no boundary, or letters such as ß, ı and µ capitalise to text that lower-cases differently. Output is NFC. Digits and separators are treated the same way in every form.
  • Punctuation separates words and an apostrophe between letters is dropped, so a title gives a usable kebab-case slug. Accented and non-Latin letters are kept, not transliterated.

Sources

Advertisement
Pre-footer · AD-W3 728 × 90