DevToolBox

Case Converter

テキストの大文字・小文字・各種ケースを即座に変換します。

How to Use the Case Converter

This free online case converter tool lets you instantly transform text between six popular casing formats: UPPER CASE, lower case, Title Case, camelCase, snake_case, and kebab-case. Simply type or paste your text in the input field, click a conversion button, and the result appears immediately. The tool supports real-time conversion, so once you select a case type, the output updates as you continue typing. All processing is performed entirely in your browser with no data sent to any server.

Supported Case Formats

UPPER CASE converts all characters to their uppercase equivalents, commonly used for constants and acronyms. Lower case converts everything to lowercase, useful for normalization and search operations. Title Case capitalizes the first letter of each word, ideal for headings and titles. camelCase joins words with the first word lowercase and subsequent words capitalized, widely used in JavaScript and TypeScript variable naming. snake_case separates words with underscores in all lowercase, the convention in Python and Ruby. kebab-case uses hyphens as separators in all lowercase, standard for CSS class names, URL slugs, and HTML attributes.

Use Cases for Developers

Developers frequently need to convert between naming conventions when working across different programming languages or frameworks. For example, a database column name in snake_case may need to become a camelCase JavaScript property, or a component name may need to be converted to kebab-case for use as a CSS class. This tool eliminates the tedious and error-prone process of manual conversion, especially for long or complex strings with multiple words.

Tips for Accurate Conversion

For best results with camelCase, snake_case, and kebab-case conversions, input text as space-separated words or in an existing casing format. The converter handles mixed inputs by detecting word boundaries from spaces, hyphens, underscores, and camelCase transitions. If your input contains special characters or numbers, the tool preserves them where appropriate for the target format. Keep in mind that some conversions are lossy; for example, converting from camelCase to UPPER CASE loses word boundary information, making it impossible to perfectly reverse the operation.

文字ケース変換ツールの使い方

この無料ツールでは、テキストを6種類のケース形式に即座に変換できます。入力欄にテキストを入力し、 変換ボタンをクリックしてください。リアルタイム変換に対応しており、ケースを選択した状態で テキストを編集すると出力も自動更新されます。「コピー」ボタンで変換結果をクリップボードに コピーできます。全ての処理はブラウザ内で完結します。

よくある落とし穴と対処 / Common Pitfalls

落とし穴 / Pitfall問題 / Problem対処 / Fix
数字を挟む snake→camel
Digits in snake_case to camelCase
user_2fa_enabled → user2faEnabled? user2FAEnabled? 規約が割れる
Conversion around digits is ambiguous
チームの linter ルール(camelcase 設定)に合わせて統一
Follow your linter's convention
連続大文字の略語
Acronyms like URL, ID
parseURLToID を snake にすると parse_u_r_l_to_i_d になりがち
Naive splitting explodes acronyms
略語は1語として扱う(parse_url_to_id)。変換後に目視確認
Treat acronyms as single words; review output
kebab-case を JS 識別子に使う
kebab-case as JS identifiers
ハイフンは減算演算子として解釈されエラーになる
Hyphens parse as minus operators
kebab は CSS クラス・URL 用。JS では camel か snake を使う
Reserve kebab for CSS/URLs
DBとAPIでケースが混在
Mixed cases across DB and API
snake_case のカラムと camelCase の JSON が混ざり変換漏れバグに
snake_case columns vs camelCase JSON drift
境界で一括変換するシリアライザを通す(手動変換しない)
Convert at the boundary with a serializer
トルコ語などの i/I 問題
Locale-sensitive casing (Turkish i)
ロケールによっては toUpperCase の結果が異なる(i→İ)
toUpperCase varies by locale
識別子の変換にはロケール非依存 API を使う
Use locale-insensitive APIs for identifiers

言語別コード例 / Code Examples

JavaScript

// snake_case → camelCase
const camel = (s) => s.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
// camelCase → snake_case
const snake = (s) => s.replace(/[A-Z]/g, (c) => "_" + c.toLowerCase());

Python

import re
def snake(s):  # camelCase → snake_case
    return re.sub(r"(?<!^)(?=[A-Z])", "_", s).lower()

変換例 / Before & After

"hello world example"
→ camelCase:  helloWorldExample   (JS変数)
→ PascalCase: HelloWorldExample   (クラス名)
→ snake_case: hello_world_example (Python/DB)
→ kebab-case: hello-world-example (CSS/URL)
→ CONSTANT:   HELLO_WORLD_EXAMPLE (定数)

Why browser-only?

The identifiers you convert are fragments of your codebase — variable names, API fields, schema columns. This converter transforms them entirely in your browser with simple string operations: nothing is uploaded, nothing is logged, and it works offline. Check the DevTools Network tab while converting — zero requests.

変換対象はコードベースの識別子そのもの。本ツールは変換がブラウザ内で完結し、 外部送信は一切ありません。

開発をもっと効率的に

PR