Case Styles: Camel, Pascal, Snake, and Kebab Case

Patrick Divine
Nov 3, 2018 · 3 min read

TLDR;

Removing spaces between words

user login count = 5;

userLoginCount = 5;

The best way to combine words

Camel Case (camelCase)

“three camels standing on street” by Lombe Kabaso on Unsplash

Raw: “user login count”

Camel Case: “userLoginCount”

Pascal Case (PascalCase)

Raw: “user login count”

Pascal Case: “UserLoginCount”

Snake Case (snake_case)

“brown snake” by David Clode on Unsplash

Raw: “user login count”

Snake Case: “user_login_count”

Snake Case (All Caps): ”USER_LOGIN_COUNT”

Kebab Case (kebab-case)

“barbecue on brown board” by pan xiaozhen on Unsplash

Raw: “user login count”

Kebab Case: “user-login-count”

Which is best?

The Startup

Medium's largest active publication, followed by +477K people. Follow to join our community.

Patrick Divine

Written by

Software engineer.

The Startup

Medium's largest active publication, followed by +477K people. Follow to join our community.