← Back to the blog
🐫

A Beginner's Guide to snake_case, camelCase, and kebab-case

Programming languages and style guides use different naming conventions for variables, functions, and files. Knowing which is expected where saves a lot of back-and-forth in code review.

camelCase

The first word is lowercase, and each following word starts with a capital letter: firstName, getUserData. Common in JavaScript and Java for variables and functions.

PascalCase

Like camelCase, but the first word is also capitalized: UserProfile, OrderService. Typically used for class and component names.

snake_case

Words are separated by underscores, all lowercase: first_name, get_user_data. Common in Python and in database column names.

kebab-case

Words separated by hyphens: first-name, user-profile. Standard for URLs, CSS class names, and file names, since underscores can be harder to read in a browser address bar.

When you need to convert a batch of text between these formats — say, turning a list of labels into valid variable names — a case converter with built-in code-case options saves you from doing it by hand.

Key takeaways

✍️ Check your own word count, grammar, and platform limits — free, right in your browser.

Open the tool

Related articles