path/case Converter

Convert camelCase, snake_case or plain text to path/case: lowercase words joined by slashes for folder paths, routes and namespaces. Line by line, in-browser.

Example: srcComponentsButton → src/components/button

Output

Each line is converted separately. Words are split at spaces, punctuation, _ - . / and camelCase boundaries; acronyms such as XML stay together and digits stay attached to the previous word.

Related Tools

View All

What is path/case?

This tool converts identifiers and phrases to path/case: lowercase words joined by forward slashes, handy for folder structures, URL routes and namespaces.

How to use path/case

  1. Type or paste text into the Input box – one identifier or phrase per line (or click Load sample).
  2. The converted text appears instantly in the Output box.
  3. Click Copy to copy the result.

Example

Input
srcComponentsButton
Output
src/components/button

When to use path/case

Use it to derive folder paths or route segments from component or module names. It does not check whether the path exists or escape characters that are invalid in file names.

How path/case works

The input is split into words, every word is lower-cased and the words are joined with /. Words are split at spaces, punctuation and the separators _ - . /, and at case changes inside identifiers: fooBar → foo + Bar, and an acronym run is kept together (XMLHttpRequest → XML + Http + Request). Digits stay attached to the word before them (Request2Go → Request2 + Go), apostrophes inside words are dropped (don't → dont), and letters of any script (é, ñ, Cyrillic, Greek…) are supported. Every line is converted separately.

Common Use Cases

  • Turning srcComponentsButton into src/components/button
  • Creating URL route paths from names
  • Generating namespace-like keys
  • Planning folder structures from module names

Security Note

Everything runs locally in your browser; the code you paste is not uploaded.

FAQs

Is a leading slash added?

No, add it yourself if you need an absolute path.

Are existing slashes kept?

Slashes are separators, so duplicated slashes collapse to one.

Does it work on Windows paths?

Backslashes are treated as separators too, and the result uses forward slashes.

Explore more categories