Identifiers for HTTP headers
Train-Case (sometimes called HTTP-Header-Case) is the identifier style for HTTP header names: Content-Type, X-Frame-Options, Cache-Control, Set-Cookie. Every word starts with a capital, words are joined with single dashes, no other separators. RFC 7230 declares HTTP header names case-insensitive, but the convention is Train-Case for readability.
The engine tokenises your input the same way as the rest of the case family, then capitalises the first letter of each token and joins with -. content type becomes Content-Type. Mixed-format input (camelCase, snake_case, lowercase phrases) all produces the same Train-Case header.
Where it shows up: HTTP request and response headers, custom X- headers, some HTML data- attribute names that follow header conventions, and capitalised slug formats in older content management systems. For the lowercase variant used in URLs and CSS, use kebab-case; for the no-separator variant used in class names, use PascalCase; for the underscore variant used in Python and Ruby identifiers, use snake_case; for the all-caps environment-variable variant, use CONSTANT_CASE.
How to use convert text to train-case (http header case)
- 1Paste or type your phrase into the input panel on the left.
- 2The Train-Case header appears in the output panel on the right as you type.
- 3Mixed input is fine:
contentType,content-type, andcontent_typeall produceContent-Type. - 4Click Copy in the output header to paste the header name into your code or HTTP client.
- 5For lowercase, use kebab-case; for joined caps, use PascalCase.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Word boundary detection
Same tokeniser as camelCase. Underscores, dashes, whitespace, and lowercase-to-uppercase transitions all count as word boundaries, so any input format produces a consistent header.
Per-word capitalisation, dash join
Each token has its first letter uppercased and the rest left lowercase, then tokens are joined with a single dash. content type -> Content-Type. The pattern is the same as PascalCase with dashes between words.
Already-formatted input round-trips
Pasting Content-Type back in still produces Content-Type. The tokeniser splits on the existing dashes, lowercases each token, capitalises the first letter, and rejoins.
Multiple separators collapse
Runs of underscores, dashes, or spaces collapse to a single dash. content---type and content__type both produce Content-Type.
Pairs with the case family
Sibling tools share the same tokeniser. kebab-case for the lowercase variant, PascalCase for the no-dash variant, snake_case for code identifiers, CONSTANT_CASE for env vars.
Worked example
Spaces, dashes, and underscores all produce the same Train-Case result. The second line shows that input that already partly looks like a header (the leading x-) tokenises cleanly into X-Frame-Options.
content type x-frame options user_profile_data
Content-Type X-Frame-Options User-Profile-Data
Settings reference
| Input | Train-Case output |
|---|---|
content type |
Content-Type |
contentType |
Content-Type (boundary via lower-to-upper split) |
content-type |
Content-Type |
content_type |
Content-Type |
CONTENT TYPE |
Content-Type |
x-frame options |
X-Frame-Options |
FAQ
Are HTTP headers actually case-sensitive?
content-type, Content-Type, and CONTENT-TYPE all refer to the same header. Train-Case is convention, not requirement, and most HTTP clients accept any case. The tool produces the canonical readable form.How is Train-Case different from kebab-case?
Content-Type); kebab-case is all lowercase (content-type). Both use dashes. Use Train-Case for HTTP headers, kebab-case for URLs and CSS class names.Will it handle camelCase input?
contentType produces Content-Type. Same for snake_case and other formats.What about acronyms in headers like X-XSS-Protection?
X-XSS-Protection tokenises by lowercase-to-uppercase boundaries, then per-word title-cases, so the output becomes X-Xss-Protection. For acronym-preserving headers, run find and replace on the output to fix specific cases.