# 大文字小文字変換

> テキストをcamelCase、snake_case、PascalCase、kebab-caseに変換、または大文字・小文字にワンクリックで変換。プログラマーにも日常の文章作成にも対応。オンラインで無料。

URL: https://acrafto.com/ja/case-converter/

Tools are interactive browser apps; there is no public API, no endpoints to call and no server-side processing. To use a tool, open its HTML page in a browser.

見出し用にテキストをすぐに大文字にしたい、逆にメールの途中でうっかり入ったままのCAPS LOCKを元に戻したい——そんなことはありませんか？あるいは、Pythonではアンダースコアで書く変数名を、JavaScriptではどう書けばいいのか迷うこともあるでしょう。当社の**ケースコンバーター**はその両方に対応します。ワンクリックで、一般的な表記からプログラミング向けの表記まで、すべての形式に同時に変換します。

当社のツールはテキスト整形のためのスイスアーミーナイフです。テキストを一度（どんな形式でも）入力するだけで、残り9種類のバリエーションに即座に変換します。

## プログラミング不要：大文字・小文字をすぐに変換

最もよくある使い方はとてもシンプルです。テキストを**全部大文字**に、**全部小文字**に、あるいは見出し用にきれいに整えたいだけ、というケースです。

- **UPPERCASE（大文字）：** 見出しやロゴ、注意書き、あるいは大文字表記が必要なフォーム（封筒の宛名など）に最適です。
- **lowercase（小文字）：** データのクレンジングに便利です。たとえば、メールアドレスやユーザー名が大文字・小文字ランダムに送られてきて、それを統一したいときに役立ちます。
- **Title Case（見出し形式）：** 各単語の先頭を大文字にする形式で、記事タイトルや商品名、英語圏スタイルのプレゼン資料などに使われます。
- **Sentence case（文形式）：** 文の最初の文字だけ大文字にし、残りは小文字にする形式です。標準的な文章の書き方と同じです。

テキストを入力欄に貼り付け、目的の形式を選んで**コピー**をクリックするだけです。Caps Lockを手動で解除したり、一文字ずつ打ち直したりする必要はありません。

## プログラミングで使うケース早見表

プログラミングをしていて、どの命名規則（naming convention）をどこで使えばいいか分からないときは、以下の早見表を参考にしてください。

### 🐪 camelCase (キャメルケース)

小文字で始まり、その後続く各単語の最初の文字が大文字になります。スペースは使用しません。

- **使用される場所:** JavaScript, Java, Swift, Kotlin, Go。
- **例:** `myVariableName`, `getElementById`, `iPhone`。

### 🐍 snake\_case (スネークケース)

すべての文字が小文字で、アンダースコアで区切られます。

- **使用される場所:** Python, Rust, PHP, SQLデータベース, ファイル名。
- **例:** `user_id`, `first_name`, `def my_function()`。

### 🍢 kebab-case (ケバブケース)

小文字がハイフンで区切られます。串刺しの肉のように見えます。

- **使用される場所:** CSSクラス, HTML属性, URLアドレス (スラッグ), Kubernetes。
- **例:** `font-size`, `my-cool-article`, `<div id="main-content">`。

### 📐 PascalCase (UpperCamelCase)

camelCaseに似ていますが、**最初の文字が大文字**です。

- **使用される場所:** ほとんどの言語でのクラス名 (JS, Python, PHP), C# (メソッドと変数), Reactコンポーネント。
- **例:** `UserProfile`, `AppController`, `ReactComponent`。

### 📢 CONSTANT\_CASE (スクリーミングスネークケース)

大文字がアンダースコアで区切られます。この値は変更してはいけないということを叫んでいます。

- **使用される場所:** 定数, 環境変数, グローバル設定。
- **例:** `MAX_RETRIES`, `API_KEY`, `DB_PASSWORD`。

---

## 当社のコンバーターの仕組み

当社のツールは「スマート」です。つまり、単にスペースを置き換えたり、文字を一つずつ大文字・小文字に変換したりするだけではありません。

1. **単語の検出：** アルゴリズムは、スペース (`hello world`)、アンダースコア (`hello_world`)、ハイフン (`hello-world`)、あるいは大文字への切り替わり (`helloWorld`) のいずれで区切られていても、単語を正しく認識します。
2. **正規化：** 入力時の表記方法に関わらず、すべてを基本形に変換します。
3. **生成：** 単純な大文字・小文字の変換から、プログラミング向けの命名規則一式まで、すべてのバリエーションを一度に作成します。

これは、たとえば古いPHPの変数 (`$user_id`) を現代的なJavaScript (`userId`) に変換したり、データベースの列名からCSSクラス (`user-id`) を作成したりするコードのリファクタリングに役立ちます。また、WordやExcelを開かなくても文章の大文字・小文字表記をさっと統一したいときにも同じように活躍します。

## FAQ: よくある質問

### 手入力せずに、オンラインでテキストを大文字に変換するにはどうすればいいですか？

上の入力欄にテキストを貼り付け、**UPPERCASE（大文字）**形式を選択してください。ツールが即座にテキスト全体を大文字に変換します。アクセント記号付きの文字（é、ü、ñなど）にも対応しており、変換後すぐに結果をコピーできます。

### 「ハンガリアン記法」とは何ですか？

これは、変数名がデータ型の略語で始まる古い記述方法です（1990年代のC/C++でよく使われました）。例えば、`strName` (string) や `iCount` (integer) などです。現代の言語では、IDEが型を自動的に表示してくれるため、あまり使われなくなっています。

### JavaScriptでkebab-caseを使えますか？

直接変数名としては使えません。なぜなら、JavaScriptではハイフン `-` が減算演算子として機能するからです。`var my-variable` は「my から variable を引く」という意味になります。JavaScriptでkebab-caseが使われるのは、クォーテーションで囲まれたオブジェクトのキーとしてのみです。例: `{ "content-type": "json" }`。

### JSONにはどのケースを使用すべきですか？

JSONの標準ではケースは規定されていませんが、GoogleやほとんどのREST APIは**camelCase** (例: `createdAt`) を使用しています。一方で、一部の古いAPIやPythonのバックエンドは**snake\_case** (例: `created_at`) を返します。重要なのは一貫性を保つことです。

### Caps Lockが誤ってオンになったまま入力してしまったテキストも直せますか？

はい。大文字と小文字が反転した状態（部分的な場合も含む）のテキストを貼り付けたら、まず**lowercase**形式を選び、必要に応じて**Sentence case**も適用すれば、通常の文章のように文頭だけ大文字になった状態に整えられます。

## Other languages

- Čeština (cs): [Převod velkých a malých písmen](https://acrafto.com/cs/konverze-velikosti-pismen/) ([Markdown](https://acrafto.com/cs/konverze-velikosti-pismen/index.md))
- Slovenčina (sk): [Prevodník veľkosti písmen](https://acrafto.com/sk/case-converter/) ([Markdown](https://acrafto.com/sk/case-converter/index.md))
- English (en): [Case Converter](https://acrafto.com/en/case-converter/) ([Markdown](https://acrafto.com/en/case-converter/index.md))
- Deutsch (de): [Case Converter](https://acrafto.com/de/case-converter/) ([Markdown](https://acrafto.com/de/case-converter/index.md))
- Français (fr): [Convertisseur majuscule minuscule](https://acrafto.com/fr/convertisseur-de-cas/) ([Markdown](https://acrafto.com/fr/convertisseur-de-cas/index.md))
- Español (es): [Convertidor de mayúsculas y minúsculas](https://acrafto.com/es/convertidor-de-casos/) ([Markdown](https://acrafto.com/es/convertidor-de-casos/index.md))
- Italiano (it): [Convertitore maiuscolo minuscolo](https://acrafto.com/it/convertitore-di-case/) ([Markdown](https://acrafto.com/it/convertitore-di-case/index.md))
- Português (pt): [Conversor de maiúsculas e minúsculas](https://acrafto.com/pt/conversor-de-casos/) ([Markdown](https://acrafto.com/pt/conversor-de-casos/index.md))
- Nederlands (nl): [Case converter](https://acrafto.com/nl/case-converter/) ([Markdown](https://acrafto.com/nl/case-converter/index.md))
- Polski (pl): [Zmiana wielkości liter](https://acrafto.com/pl/konwerter-wielkosci-liter/) ([Markdown](https://acrafto.com/pl/konwerter-wielkosci-liter/index.md))
- Română (ro): [Convertor litere mari și mici](https://acrafto.com/ro/convertor-cazuri/) ([Markdown](https://acrafto.com/ro/convertor-cazuri/index.md))
- Magyar (hu): [Nagybetű kisbetű átalakító](https://acrafto.com/hu/case-atalakito/) ([Markdown](https://acrafto.com/hu/case-atalakito/index.md))
- Ελληνικά (el): [Μετατροπή κεφαλαίων σε πεζά](https://acrafto.com/el/case-converter/) ([Markdown](https://acrafto.com/el/case-converter/index.md))
- Български (bg): [Конвертор на главни и малки букви](https://acrafto.com/bg/case-konverter/) ([Markdown](https://acrafto.com/bg/case-konverter/index.md))
- Hrvatski (hr): [Pretvarač velikih i malih slova](https://acrafto.com/hr/case-converter/) ([Markdown](https://acrafto.com/hr/case-converter/index.md))
- Slovenščina (sl): [Pretvornik velikosti črk](https://acrafto.com/sl/pretvornik-zapisov/) ([Markdown](https://acrafto.com/sl/pretvornik-zapisov/index.md))
- Eesti (et): [Case muundur](https://acrafto.com/et/case-muundur/) ([Markdown](https://acrafto.com/et/case-muundur/index.md))
- Latviešu (lv): [Lielo un mazo burtu pārveidotājs](https://acrafto.com/lv/gadijumu-parveidotajs/) ([Markdown](https://acrafto.com/lv/gadijumu-parveidotajs/index.md))
- Lietuvių (lt): [Raidžių formato keitiklis](https://acrafto.com/lt/raidziu-formato-keitiklis/) ([Markdown](https://acrafto.com/lt/raidziu-formato-keitiklis/index.md))
- Svenska (sv): [Case converter](https://acrafto.com/sv/case-omvandlare/) ([Markdown](https://acrafto.com/sv/case-omvandlare/index.md))
- Dansk (da): [Case converter](https://acrafto.com/da/case-konverter/) ([Markdown](https://acrafto.com/da/case-konverter/index.md))
- Suomi (fi): [Kirjainkoon muunnin](https://acrafto.com/fi/case-muunnin/) ([Markdown](https://acrafto.com/fi/case-muunnin/index.md))
- Norsk (no): [Case-konverterer](https://acrafto.com/no/case-konverterer/) ([Markdown](https://acrafto.com/no/case-konverterer/index.md))
- Українська (uk): [Конвертер регістру](https://acrafto.com/uk/konverter-registru/) ([Markdown](https://acrafto.com/uk/konverter-registru/index.md))
- Русский (ru): [Конвертер регистра](https://acrafto.com/ru/konverter-registrov/) ([Markdown](https://acrafto.com/ru/konverter-registrov/index.md))
- Српски (sr): [Konverter velikih i malih slova](https://acrafto.com/sr/pretvarac-formata-teksta/) ([Markdown](https://acrafto.com/sr/pretvarac-formata-teksta/index.md))
- Македонски (mk): [Конвертор на букви](https://acrafto.com/mk/konvertor-sluchai/) ([Markdown](https://acrafto.com/mk/konvertor-sluchai/index.md))
- Bosanski (bs): [Konverter velikih i malih slova](https://acrafto.com/bs/konverter-velicina-slova/) ([Markdown](https://acrafto.com/bs/konverter-velicina-slova/index.md))
- Shqip (sq): [Konvertues shkronjash](https://acrafto.com/sq/konvertues-rastesh/) ([Markdown](https://acrafto.com/sq/konvertues-rastesh/index.md))
- Türkçe (tr): [Büyük küçük harf dönüştürücü](https://acrafto.com/tr/case-converter/) ([Markdown](https://acrafto.com/tr/case-converter/index.md))
- 한국어 (ko): [대소문자 변환기](https://acrafto.com/ko/case-converter/) ([Markdown](https://acrafto.com/ko/case-converter/index.md))
- العربية (ar): [تحويل الحروف الكبيرة والصغيرة](https://acrafto.com/ar/case-converter/) ([Markdown](https://acrafto.com/ar/case-converter/index.md))
- हिन्दी (hi): [केस कनवर्टर](https://acrafto.com/hi/case-converter/) ([Markdown](https://acrafto.com/hi/case-converter/index.md))
- Bahasa Indonesia (id): [Ubah huruf besar dan kecil](https://acrafto.com/id/konverter-case/) ([Markdown](https://acrafto.com/id/konverter-case/index.md))
- Tiếng Việt (vi): [Chuyển đổi chữ hoa thường](https://acrafto.com/vi/bo-chuyen-doi-kieu-chu/) ([Markdown](https://acrafto.com/vi/bo-chuyen-doi-kieu-chu/index.md))
- ไทย (th): [แปลงตัวพิมพ์ใหญ่และเล็ก](https://acrafto.com/th/case-converter/) ([Markdown](https://acrafto.com/th/case-converter/index.md))
- עברית (he): [המרת אותיות גדולות וקטנות](https://acrafto.com/he/case-converter/) ([Markdown](https://acrafto.com/he/case-converter/index.md))
