Train-Case Converter

Convert text to Train-Case online. Perfect for HTTP headers like Content-Type and X-Custom-Header. Free train case converter, no signup.

🔒 Your text stays in your browser - nothing is sent to our servers
Input
0Characters
0No spaces
0Words
0Sentences
0Lines
< 1 minRead time
Result
How to Use

Three steps to get started

1

Paste your text

Enter any text, phrase, camelCase, snake_case, or other format into the input.

2

Converts to Train-Case

Each word is capitalized and joined with hyphens - like This-Is-Train-Case.

3

Copy the result

Click Copy and paste into your HTTP headers, config files, or code.

About This Tool

Train-Case: the format of HTTP headers

Train-Case is a naming convention in which the first letter of every word is capitalized and words are joined by hyphens, producing identifiers such asContent-Type or My-Variable-Name. It is also called HTTP-Header-Case, Title-Kebab-Case, or simply Hyphenated PascalCase. The name comes from the visual impression of capitalized carriages coupled along a hyphen track.

Its natural habitat is the HTTP header field. RFC 9110 defines header field names as case-insensitive, but the canonical spellings published in the IANA HTTP Field Name Registry are written in Train-Case, and virtually every browser devtools panel, proxy log, and HTTP client library displays them that way.

Where you will encounter it:

  • Standard headers: Content-Type, Accept-Language, Cache-Control, If-None-Match, Strict-Transport-Security
  • Custom headers: X-Request-Id, X-Api-Key, X-Forwarded-For, X-RateLimit-Remaining
  • MIME and email headers in RFC 5322 messages: Message-Id, In-Reply-To, Content-Disposition
  • Cookie attributes: Max-Age, Same-Site, Http-Only
  • Perl module and Lisp-family symbol naming, where hyphenated words are idiomatic

Does HTTP/2 make Train-Case obsolete?

No, but it changes what is on the wire. HTTP/2 and HTTP/3 require header field names to be transmitted in lowercase; sending Content-Type literally over an HTTP/2 connection is a protocol error, and HPACK's static table stores every name lowercased. Client libraries normalize for you, so the human-facing convention survives: Node's http module lowercases incoming header keys while Ruby's Rack and .NET's HttpClient still surface Train-Case. Treat the case as presentation, never as an equality check - compare header names case-insensitively.

The most common mistake is inconsistent acronym handling. X-Api-Key andX-API-Key both appear in the wild and both work, but mixing them inside one codebase makes grep unreliable. Pick one and enforce it. Note also that Train-Case is not a legal identifier in C-family languages - the hyphen parses as subtraction - so it belongs in strings and config keys, not variable names; use camelCase or snake_case there.

This converter splits on spaces, underscores, dots, existing hyphens, and camelCase boundaries, so maxRetryCount, max_retry_count, andmax retry count all normalize to Max-Retry-Count. Everything is computed locally in the page - no server round trip, no logging, no length cap.

FAQ

Frequently Asked Questions

Related Tools