CcConvertCase

Ruby String Case Conversion โ€“ Built-in Methods Guide

Published 2026-03-03 ยท convertcase.in

Ruby's String class includes intuitive case conversion methods. Here's a complete reference with examples.

Try it now โ€” free instant conversion

No signup ยท No limits ยท Works on all devices

Open ConvertCase โ†’

1Ruby Case Methods

"hello".upcase โ†’ "HELLO"
"HELLO".downcase โ†’ "hello"
"hello world".capitalize โ†’ "Hello world"
"Hello World".swapcase โ†’ "hELLO wORLD"

2Title Case in Ruby

No built-in title case. Use: str.split.map(&:capitalize).join(" ") โ€” note this capitalises ALL words including "and", "the".

Frequently Asked Questions

Is Ruby's capitalize the same as sentence case?

Partially โ€” capitalize only affects the first character of the whole string, not each sentence.

Related Guides

Convert Case in Python โ€“ Methods & ExamplesText Case Conversion in PHPFree Snake_case Converter Online