FIRST CH TOOLS / 38 CASE CONVERTER
Case Converter — camelCase, snake_case, kebab-case
Convert identifiers between camelCase, snake_case, kebab-case, PascalCase and CONSTANT_CASE. Paste as many lines as you like and they are converted in one pass, or switch to per-field mode to tidy a comma or tab separated CSV header row without touching the separators. Acronyms such as XMLHttpRequest and digit runs such as sha256Hash are split the way you meant them.
Converted as you type
Leading and trailing spaces, indentation and the line endings (LF / CRLF) are all preserved, so you can swap the names without disturbing the layout of a table or a block of code. Blank lines and lines made only of punctuation are left alone.
Where each case belongs
| Case | Example | Where it is used |
|---|---|---|
| camelCase | userName | Variables and functions in JavaScript, Java and Swift; JSON keys |
| PascalCase | UserName | Class and type names, React / Vue components, public members in C# |
| snake_case | user_name | Variables and functions in Python, Ruby and PHP; SQL tables and columns |
| CONSTANT_CASE | USER_NAME | Constants, environment variables (.env), Makefile variables |
| kebab-case | user-name | URL paths, CSS classes and custom properties, HTML attributes, npm package names, file names |
| Train-Case | User-Name | HTTP header names (Content-Type / X-Request-Id) |
| dot.case | user.name | Configuration keys (application.properties), namespaces, log field names |
| Title Case | User Name | Headings, table column headers, UI labels |
| Sentence case | User name | Body copy, descriptions, form labels |
| lower case | user name | Normalising for search, tags |
| UPPER CASE | USER NAME | Emphasised headings, printed field names |
When in doubt, follow the convention of the language and the layer you are in. Within a single project it is perfectly normal for database columns to be snake_case, the JSON of the API camelCase and the URLs kebab-case — this tool exists to do the mechanical conversion at those boundaries.
How to Use
- Pick the target caseEleven of them, from camelCase to UPPER CASE. The result changes the moment you choose.
- Paste your textOne item per line by default. To tidy a CSV header row, switch the unit to "each comma / tab separated field" and only the field names are converted — the separators stay exactly as they were.
- CopyTake the whole right-hand box, or click a row under "every case" to copy just that one. Name collisions and results starting with a digit are listed under Checks.
About This Tool
Case conversion is really the question of where the word boundaries are. With a separator such as user_name that is easy; with a run of capitals such as XMLHttpRequest it is not. This tool breaks before a run of capitals only when that run is followed by a capital and a lower-case letter, which gives XML / Http / Request — a naive "split before every capital" gives you X / M / L / Http….
Digits stay attached to the word before them by default. sha256Hash is sha256 / Hash, not sha / 256 / Hash. Turn on "start a new word at digits" when a version number or a size really is its own word. A word that starts with digits and continues in lower case, such as 2fa, is kept as one word; when capitals follow, as in 2FactorAuth, the boundary is taken as deliberate and kept.
Acronyms (ID, URL, XML) are handled differently by different style guides. The default folds them, giving parseXmlData — the form Google's style guides use, because it still shows the boundaries when two acronyms meet, as in parseXMLHTTPData. If you need to match existing code that writes userID, turn on "keep acronyms capitalised". The first word of a camelCase name is lower-cased either way (URLParser → urlParser).
To tidy CSV headers, choose "each comma / tab separated field". A line containing tabs is split on tabs, otherwise on commas, and the separators and the spacing around them are left untouched — a tab separated row copied straight out of Excel comes back in the same shape. In this mode the tool also checks whether two columns end up with the same name: first name and first_name both become first_name. Colliding column names are how one of them silently disappears on import, so the count and the names are reported.
Text in scripts without letter case — Japanese, for instance — is passed through unchanged, though separators still work (受注 日付 becomes 受注_日付). Such words are never transliterated into Latin letters: guessing a reading is easy to get wrong, and being quietly wrong is worse than leaving it alone.
Results that start with a digit are flagged too. Most languages will not accept an identifier beginning with a number, so 2FactorAuth → 2_factor_auth cannot be used as a variable name as it stands; it needs a prefix or a rewording.
Nothing you paste ever leaves the browser — the conversion and the checks all run on your machine. Directly callable via URL parameters: /en/case/?text=user_name&format=camel / /en/case/?text=first%20name,last%20name&format=snake&scope=items
From AI Agents
The same conversion logic is available as the case_convert tool of the MCP (Model Context Protocol) server @first-ch/tools-mcp, so an AI agent can call it directly without driving a browser — handy for mechanical jobs such as renaming variables in bulk or normalising CSV headers. See How to use from AI agents for the details.
Install
claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
Examples
# Convert one item per line to camelCase case_convert(text="user_name\nlast-name\nEMAIL_ADDRESS", format="camel") # Tidy a CSV header row into snake_case, keeping the separators case_convert(text="First Name, Last Name, E-Mail", format="snake", scope="items") # See one identifier in every case case_convert(text="XMLHttpRequest", allFormats=true) # Read a file, convert it and write the result somewhere else case_convert(path="/tmp/headers.csv", format="kebab", scope="items", outputPath="/tmp/out.csv")
Other Tools
- 01WebP Converter画像→WebP一括変換
- 02White BG Remover白背景の透過
- 03Contrast Checkerコントラスト比チェッカー
- 04Character Counter文字数カウント
- 05llms.txt Generatorllms.txt ジェネレーター
- 06JSON-LD GeneratorJSON-LD構造化データ生成
- 07Markdown → PDFMarkdown→PDF変換
- 08OGP Meta Tag WizardOGPメタタグ生成ウィザード
- 09Favicon Generatorfaviconジェネレーター
- 10TikTok PublisherTikTok投稿ツール
- 11Encoding Converter文字コード・改行コード変換
- 12AVIF Converter画像→AVIF変換+picture生成
- 13Test Data Generatorテストデータ生成
- 14Marp Markdown → SlidesMarp Markdown→スライド
- 15Text & Code Diff Checkerテキスト・コード差分チェッカー
- 16Cron ExplainerCron式ビジュアル解説&発火日時
- 17Base64 & Data URIBase64 & Data URI変換
- 18URL Parameters & UTMURLパラメータ分解・UTMタグ編集
- 19HTML Escape & UnescapeHTMLエンティティ・特殊文字エスケープ
- 20JSON ⇄ YAML ConverterJSON ⇄ YAML 相互変換&整形
- 21PX ⇄ REM / EM ConverterPX ⇄ REM / EM 単位変換
- 22Color Converter & AlphaColorコード変換&アルファ透過
- 23Hash GeneratorMD5 / SHA-256 ハッシュ生成
- 24JWT Decoder & ExpiryJWTデコーダー&有効期限チェック
- 25User-Agent ParserUser-Agent 解析&デバイス判定
- 26UUID & ULID GeneratorUUID & ULID 一括生成
- 27Aspect Ratio Calculatorアスペクト比計算&サイズ算出
- 28Markdown Table & CSV/TSV ConverterMarkdownテーブル整形&CSV/TSV変換
- 29SQL Query FormatterSQLクエリフォーマッター&整形
- 30QR Code GeneratorQR Code Generator
- 31Regex Tester正規表現テスター
- 32Unix Timestamp ConverterUNIXタイムスタンプ⇄日時変換
- 33New Tab Memo — Chrome Extension新規タブメモ帳 Chrome拡張
- 34Image Resizer & Cropper画像リサイズ&クロップ
- 35EXIF Viewer & RemoverEXIF情報の確認&除去
- 36robots.txt Generatorrobots.txt ジェネレーター
- 37Secure Password Generator安全なパスワード生成