Skip to content
gohacks.dev
Standard Library

Case Converter

Convert any identifier or phrase between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE_CASE, Title Case and more at once.

Free · No sign-up · Your inputs stay in your browser

Input

Convert between naming cases

Output

9 words

camelCase

userProfileImageUrlForParseHttpResponse2

PascalCase

UserProfileImageUrlForParseHttpResponse2

snake_case

user_profile_image_url_for_parse_http_response_2

SCREAMING_SNAKE_CASE

USER_PROFILE_IMAGE_URL_FOR_PARSE_HTTP_RESPONSE_2

kebab-case

user-profile-image-url-for-parse-http-response-2

Train-Case

User-Profile-Image-Url-For-Parse-Http-Response-2

dot.case

user.profile.image.url.for.parse.http.response.2

path/case

user/profile/image/url/for/parse/http/response/2

Title Case

User Profile Image Url For Parse Http Response 2

Sentence case

User profile image url for parse http response 2

lower case

user profile image url for parse http response 2

UPPER CASE

USER PROFILE IMAGE URL FOR PARSE HTTP RESPONSE 2

Runs in this browser. Nothing you paste is sent to a server.

Which case goes where

Conventions are set by each ecosystem rather than by taste. PSR-1 asks PHP for StudlyCaps class names and camelCase methods; Laravel's database columns and config keys are snake_case; environment variables are SCREAMING_SNAKE_CASE; CSS classes, URLs and npm package names are kebab-case. Matching the convention of the code around you matters more than any of them.

How words are found

A change from lower to upper case starts a word, and a run of capitals followed by a lowercase letter is split before its last capital, so parseHTTPResponse becomes parse, HTTP, Response. Digits after letters start a new word. Laravel's Str::camel(), Str::snake() and Str::kebab() apply similar rules on the server.

Share

Frequently asked questions

What is the difference between camelCase and PascalCase?
Both join words without separators. camelCase starts with a lowercase letter (getUserById); PascalCase, also called StudlyCaps, capitalises the first word too (GetUserById).
Does it handle acronyms?
Yes. A run of capitals is kept together as one word, so XMLHttpRequest splits into XML, Http and Request.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools