About Snake Case Converter
Python variables, Ruby methods and most database columns use snake_case: lowercase words joined by underscores. Paste "Created At" or createdAt and get created_at.
It works one line at a time, which makes it quick to turn a header row pasted as a column, or a list of form labels, into column names. Spaces, hyphens, dots and other punctuation all become a single underscore, and nothing is left at either end.
How it works
- For writing styles, the text is recased in place: spacing, punctuation and line breaks are untouched.
- For programming styles, each line is split into words at spaces, punctuation and existing capital-letter boundaries, then rejoined in the chosen convention.
- Title Case keeps short joining words such as "of", "and" and "the" lowercase unless they start or end the line.
Questions
What happens to existing underscores and repeated spaces?
Any run of separators, whether spaces, underscores, hyphens or punctuation, becomes one underscore, and leading or trailing ones are dropped. " first -- name " becomes first_name.
How does it split camelCase input?
At every change from a small letter or digit to a capital, and before the last capital of an acronym, so "userIDNumber" becomes user_id_number.
I need SCREAMING_SNAKE_CASE. Is that here?
Yes, as CONSTANT_CASE in the Convert to menu. It splits the same way and uses capitals instead.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.