Kebab Case vs Camel Case in URLs

Last modified by Eleni Cojocariu on 2025/08/14 13:41

Comparisons

 Kebab CaseSpacesSnake CaseCamel Case
RecommendedUsing hyphens is widely recommended as best practice because it improves the SEO. Search engines treat hyphens as word separators, making it easier to index individual keywords. It is recommended by several websites (Google, Stackoverflow) and preferred over Snake case.Not recommended as a delimiter of words, since the URL doesn't look nice when sharing (it's replaced with %20). While URLs with spaces may appear correctly in some web browsers, relying on this is inconsistent, and makes URLs harder to read and less pleasant to share.Underscores are considered part of a word, so search engines treat connected words as a single term, while hyphens separate words (so that a search engine can index the individual words).Not recommended because it doesn’t help search engines index each word separately; the words remain concatenated.
Pros
Human-readable in plain text before encoding which can make the URL easier to interpret at first glance, and in some websites that don't convert the space into %20, it can remain visually clean when displayed.-
  • Easy to read
  • Shorter URLs than other solutions
  • It’s a historical convention in wikis, where page names (which become links) often use Camel Case. Using it in URLs keeps consistency with page names.
ConsLonger URLs when multiple words are usedAutomatically encoded to `%20` in URLs; looks messy in links. It would be too risky to rely only on the fact that some browsers don’t convert it into `%20`.It affects the SEO since words aren't split.
  •  According to RFC 3986, URLs are case-sensitive in certain parts (path, query, etc.), so /MyPage is different from /mypage.
  • Users don't tend to write URLs capitalized

Other best practices:

  • Use lowercase letters.
  • Eliminate stop words ('a', 'the', 'when', 'while', 'in').

Sources

PS: all the links listed above as sources use hyphen as delimiter.

Get Connected