NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

Variable Name Converter API

POST

Align variable names across languages and naming conventions.

Variable Name Converter transforms variable names between different naming conventions including camelCase, snake_case, PascalCase, and kebab-case. Punctuation that cannot appear in an identifier, such as the parentheses in Order Total ($), separates words and is dropped, so spreadsheet headers convert cleanly.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/variablenameconverter
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "results": [
      {
        "original": "myVariableName",
        "converted": "my_variable_name"
      },
      {
        "original": "another_var_name",
        "converted": "another_var_name"
      },
      {
        "original": "SomeClassName",
        "converted": "some_class_name"
      },
      {
        "original": "kebab-case-name",
        "converted": "kebab_case_name"
      },
      {
        "original": "CONSTANT_VALUE",
        "converted": "c_o_n_s_t_a_n_t__v_a_l_u_e"
      }
    ],
    "count": 5,
    "targetFormat": "snake_case"
  }
}

About the Variable Name Converter API

Perfect for code refactoring, style guide enforcement, and converting between different programming language naming standards.

What people use it for

Code Refactoring
Convert variable names when refactoring code between different style guides
Language Migration
Migrate variable naming between programming languages with different conventions
Style Enforcement
Enforce consistent naming conventions across codebases
Bulk Conversion
Convert multiple variable names simultaneously for large-scale refactoring

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Variable Name Converter

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Variable Name Converter API.

Read the docs →
Which naming conventions can I convert between?
Variable Name Converter supports transformations across camelCase, snake_case, PascalCase, CONSTANT_CASE and kebab-case. Spaces, hyphens, underscores and any punctuation separate words, so a column header like Price (USD) becomes price_usd, and validIdentifier flags results that start with a digit.
Does the response include the original variable names alongside the conversions?
Yes. Each entry in the results list returns both the original variable name and the converted value, along with the total count and target format.
How many variable names can I submit in one request?
You can send up to 100 variable names in a single call using the variables array. For larger refactoring batches or codebases, divide your names across multiple requests.
Are the converted variable names included on the Free plan?
The results array containing the converted variable names is a premium field. While the Free plan allows testing basic responses, viewing the full converted values requires the Starter plan or above.
How far does the Starter plan go for converting variable names?
Each API call uses 1 credit, so Starter provides 200,000 calls per month. With up to 100 variables per request, that covers up to 20 million variable conversions, working out to about $0.15 per 1,000 calls. The Free plan provides 200 calls per month.

Ready to build with Variable Name Converter? Start with 200 free credits — one key unlocks all 404+ APIs.

Explore the catalog

404+ APIs on the same key and the same response shape.

Browse all APIs