AIStacker
文本

概览

字符串大小写转换器

将任意字符串即时转换为 camelCase、PascalCase、snake_case、kebab-case 等 10 种格式。

分类 hub

文本

问题

5

FAQ

4

String Case Converter

Convert any string to camelCase, PascalCase, snake_case, kebab-case, and 6 more formats instantly.

camelCase
PascalCase
snake_case
SCREAMING_SNAKE
kebab-case
COBOL-CASE
dot.case
Title Case
lowercase
UPPERCASE

可以解决的问题

How do I convert snake_case to camelCase?

Paste the snake_case string into the input. The camelCase output row updates instantly. Click "Copy" to copy just the camelCase result. For example, user_first_name becomes userFirstName.

How do I convert camelCase to kebab-case for CSS?

Type or paste the camelCase string. The kebab-case row shows the result immediately. For CSS custom properties, kebab-case is the standard — backgroundColor becomes background-color.

What format should environment variables use?

Environment variables conventionally use SCREAMING_SNAKE_CASE — all uppercase with underscores as separators. Examples: DATABASE_URL, API_KEY, MAX_RETRY_COUNT. This tool's SCREAMING_SNAKE row gives you the correct format.

What case format should I use for JSON API fields?

REST APIs most commonly use camelCase (JavaScript/Node.js conventions) or snake_case (Python/Ruby conventions). GraphQL schemas typically use camelCase. This tool lets you quickly generate both from a plain English name.

How do I rename columns from display names to database-safe names?

Paste the human-readable column name (e.g., "First Name") into the input. The snake_case row gives you the database-safe version: first_name. This is the conventional format for SQL column names in PostgreSQL and MySQL.

典型使用流程

Regex Tester字符串大小写转换器Diff Checker

该工作流相关指南

Supporting guides that connect this tool to the broader category workflow.

打开分类 hub

是什么

字符串大小写转换器 是什么

The String Case Converter transforms any input string into 10 different naming case formats simultaneously. Type once — get camelCase, PascalCase, snake_case, SCREAMING_SNAKE, kebab-case, COBOL-CASE, dot.case, Title Case, lowercase, and UPPERCASE all at once, each with a one-click copy button.

The converter handles mixed input intelligently. Whether you paste a space-separated phrase, a camelCase variable name, a SCREAMING_SNAKE constant, a kebab-case CSS class, or a dot.separated key, the tokenizer correctly splits the words before applying each format. This makes it useful for renaming variables across languages, preparing API field names, or generating CSS class names from copy.

如何使用

如何使用字符串大小写转换器

1. Type or paste your string into the input field — any format works as input.

2. All 10 output formats update instantly below.

3. Click "Copy" next to any format to copy just that result.

4. Click one of the Quick Examples to prefill the input with a sample string.

5. Click Clear (the trash icon) to reset the input.

使用示例

使用示例

Input: "get user by id"

camelCase    → getUserById
PascalCase   → GetUserById
snake_case   → get_user_by_id
SCREAMING    → GET_USER_BY_ID
kebab-case   → get-user-by-id
COBOL-CASE   → GET-USER-BY-ID
dot.case     → get.user.by.id
Title Case   → Get User By Id
lowercase    → get user by id
UPPERCASE    → GET USER BY ID

常见使用场景

常见使用场景

1. Rename variables across languages: Convert Python snake_case to JavaScript camelCase or Java PascalCase in one step.

2. Generate CSS class names: Convert design token names to kebab-case for CSS custom properties.

3. Map API response fields: Convert snake_case JSON keys to camelCase for JavaScript objects.

4. Generate constants: Convert descriptive names to SCREAMING_SNAKE for environment variables or enum values.

5. Database column naming: Convert human-readable column names to snake_case for SQL schemas.

6. Configuration keys: Convert dot.case property paths for frameworks like Spring or .NET.

常见问题

常见问题

Does it handle mixed input like camelCase or SCREAMING_SNAKE as input?v
Yes. The tokenizer splits camelCase at boundaries (e.g., getUserId → [get, user, id]) and splits SCREAMING_SNAKE, kebab-case, dot.case, and space-separated inputs correctly before converting.
What's the difference between PascalCase and camelCase?v
PascalCase (also called UpperCamelCase) capitalizes the first letter of every word including the first: GetUserId. camelCase (lowerCamelCase) lowercases the first word and capitalizes subsequent ones: getUserId.
What is SCREAMING_SNAKE_CASE used for?v
SCREAMING_SNAKE is the conventional format for constants and environment variables in many languages — Python constants (MAX_RETRIES), shell environment variables (DATABASE_URL), and Java static finals.
Does this work with non-ASCII characters?v
The converter processes Unicode strings correctly for splitting and joining. However, case transformations (upper/lower) follow JavaScript's built-in string methods, which are locale-agnostic and may not handle locale-specific case rules.