LocalExcelTool
はじめる

命名規則変換

camelCase / snake_case / kebab-case などを相互変換。変数名の整理に。

命名規則変換とは

命名規則変換とは、識別子の表記を camelCase・PascalCase・snake_case・kebab-case・CONSTANT_CASE などに切り替える処理です。混合した入力から単語を抽出して再組み立てします。

🔒 処理はすべてブラウザ内で完結し、データは送信されません。

このツールの前提

処理場所
このページのブラウザ内(JavaScript / Canvas)
アップロード
なし — ファイルは端末の外に出ません
オフライン
ページを開いた後は通信不要

Splitting an identifier into words is the whole problem

camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and dot.notation all encode the same word list, so the conversion is only as good as the tokeniser. This one splits on lower-to-upper boundaries, then on upper-run-to-word boundaries, then on separators — which is why parseHTMLDocument becomes parse, HTML, Document rather than parse, H, T, M, L, Document.

The acronym boundary is where naive implementations fail. A single regex for lower-followed-by-upper turns HTTPServer into H, T, T, P, Server or http, server depending on ordering. Getting it right needs two passes, and the second pass is specifically for uppercase runs followed by a lowercase letter.

Digits and existing separators

A digit next to a letter is ambiguous: utf8Decoder could be utf8 + decoder or utf + 8 + decoder, and both conventions exist in the wild. This implementation treats the digit as part of the preceding token, which matches the common Python and Go styles but not every codebase.

Mixed input — some_snake and someCamel in the same string — is accepted and normalised, because the splitter runs all the rules in sequence. That tolerance is useful when converting a CSV header row, where the columns were named by different people at different times.

What conversion cannot fix

Renaming a variable in a codebase is a refactor, not a string transform: the same word may appear in comments, log messages, JSON keys and a database column, and only one of those should change. Use this for generating a naming-convention table or converting a header row, not for a find-and-replace across a repository.

Also watch for collisions after conversion. user_id and userId and user-id all become user_id, so a table keyed on the converted name silently merges three distinct columns into one. Check for duplicate output before using it as a header row.

使い方

  1. 1.識別子を入力
  2. 2.目的の命名規則を選択
  3. 3.結果をコピー

他の方法との比較

同じ変換をする方法は 3 つあります。ブラウザ内(このページ)、サーバー側の変換サービス、デスクトップアプリ。差がつくのは速度ではなく、ファイルがどこへ行くかと、無料でどこまでできるかです。

観点このツールサーバー側の変換サービス
ファイルの処理場所このページのブラウザ内ベンダーのサーバー(アップロード後)
アカウント不要多くの場合必要(無料枠の制限解除に登録を求める)
無料で扱えるサイズサイズ制限なし(回数制限もなし)数ファイル/時間、または 5〜10MB 程度で課金 wall
料金無料。Pro は月 $9(大きいファイルと AI 機能のみ)サブスクが一般的。おおむね月 $7〜15(2026 年 11 月時点)
オフライン一度開けば通信不要不可
20MB を処理し始めるまで待ち時間なし(アップロードが無い)アップロードが支配的(10Mbps 上りで約 16 秒)
保証できないこと何も保存されないため、閉じたタブの内容は復元できません同じ(変換の原理は変わらない)

サーバー側のサービスが優れている点は明確にあります。巨大なファイル、チームでの共有、変換履歴の管理、スクリプトからの自動化。逆に「1 回だけ、手元のファイルを別形式にしたい」という今回の用途では、アップロードの待ち時間と登録の手間だけが増えます。

よくある質問

どんな入力形式に対応しますか?

スペース・アンダースコア・ハイフン区切りと、キャメルケース・パスカルケース・大文字定数名を自動で単語に分解します。

日本語の識別子も変換できますか?

単語区切りがないため、日本語のみの入力はそのままになります。

この変換で失われるもの

テキストツールはページ外に出ません。貼り付けた文字列はメモリ上で変換され、結果欄に書き戻されます。リクエストもログも保持もないため、タブを閉じた値を復元する方法もありません。

その他のテキスト処理