String Converter
Convert between string formats (camelCase, snake_case, etc.)
String Converter tool
String Converter: key facts
- What it does
- Convert between string formats (camelCase, snake_case, etc.)
- Category
- Developer Tools
- Cost
- Free, with no account, sign-up, or install.
- Your data
- Runs entirely in your browser — the files and text you enter are never uploaded to a server.
- Last reviewed
- . Report an incorrect result.
What the String Converter does
Naming things consistently is one of those small chores that eats real time. The String Converter takes a word or phrase and rewrites it into any of ten naming conventions — camelCase, snake_case, kebab-case, PascalCase, SCREAMING_SNAKE_CASE, train-case, dot.case, space case, lowercase, or UPPERCASE — and converts directly between them.
It is built for the moments developers hit constantly: turning a database column like first_name into the firstName your API layer expects, converting a React component name into the kebab-case slug its file should use, or reformatting a list of constants into SCREAMING_SNAKE_CASE before pasting them into a config. Technical writers and translators reach for it too, when a glossary needs to move between human-readable "space case" and machine-friendly identifiers.
Because you pick both a "From" and a "To" format, the tool understands the structure of what you paste rather than blindly lower-casing it — so MyVariableName splits correctly into the words "my", "variable", "name" before it is reassembled.
Using the String Converter, step by step
- Paste or type your text into the "Input String" box.
- Choose the format your text is currently in from the "From" dropdown (for example, PascalCase).
- Choose the format you want from the "To" dropdown (for example, snake_case).
- Read the converted result instantly — it updates as you type or change either dropdown.
- Use the swap button between the two dropdowns to reverse the direction without re-selecting, then click Copy to send the result to your clipboard.
Splitting into words, then rejoining
Every conversion works the same way: the input is split into constituent words according to the convention it currently uses, then rejoined in the target convention. Camel and Pascal case are split at capital letters, snake case at underscores, kebab case at hyphens, and dot notation at full stops.
That two-step approach is what allows any source convention to reach any target without maintaining a separate rule per pair. It also explains the tool's main limitation: it can only split on the boundaries a convention actually marks, so a name written as one lowercase run with no separators has no word boundaries to find.
Acronyms are the awkward case for the same reason. Splitting at every capital letter turns a run of capitals into several single-letter words, so identifiers containing initialisms rarely survive a round trip exactly as written.
- userName in camel case becomes user_name in snake case and user-name in kebab case.
- A snake-case name converts to Pascal case by capitalising each word and removing the separators.
- An identifier such as parseHTTPResponse splits at each capital, so the acronym does not stay intact.
What makes this one worth using
- Conversion runs entirely in your browser in JavaScript — nothing you paste is uploaded, so internal variable names and unreleased identifiers stay on your machine.
- It handles all ten common conventions in one place and converts between any pair, rather than only "to camelCase" like many single-purpose converters.
- The dedicated "From" selector means the tool parses word boundaries correctly instead of guessing, so compound names round-trip cleanly.
- Results are live and there is no length limit in the code, so you can convert a single token or a whole pasted block at once.
Which convention belongs where
Conventions are not arbitrary preference — each ecosystem has a dominant one, and following it is what makes code look native. Camel case for variables and functions in JavaScript and Java, with Pascal case for classes and React components. Snake case for Python and Ruby, and conventionally for SQL identifiers. Kebab case for URLs, CSS class names, and HTML attributes, since neither URLs nor CSS permit underscores comfortably. Screaming snake case for constants and environment variables.
Crossing a boundary is where conversion earns its place: an API returning snake-case keys consumed by a camel-case codebase, or a database column mapped to an object property. Doing that transformation in one place at the boundary is much better than scattering both conventions through the code.
A caution about URLs specifically. Hyphens are the documented preference for readability in paths, and mixed case in a URL is best avoided entirely because path comparison is case-sensitive on most servers — the same page reachable at two casings is a duplicate-content problem as well as a source of broken links.
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
Both join words without separators, but camelCase leaves the first word lowercase (myVariableName) while PascalCase capitalizes every word including the first (MyVariableName). camelCase is conventional for variables and functions in many languages; PascalCase is common for class and component names.
Why does my converted text look wrong?
Most often the "From" format does not match the actual format of your input. The tool relies on that setting to find word boundaries — if you pick camelCase but your text is already snake_case, it cannot split the words correctly. Set "From" to match your real input and the result will be accurate.
Is my text sent to a server?
No. The conversion happens locally in your browser using plain JavaScript. Nothing is transmitted or stored, which makes it safe for proprietary code and internal naming.
Can I convert more than one line at a time?
The tool converts the full contents of the input box as a single string. For converting many separate identifiers in bulk, paste them one per line and convert, or use a regex tool for line-by-line transformation.