Free dev tools
Salesforce Label to API Name Converter
Turn a human-readable field or object label into the API name Salesforce would generate, plus the custom (__c) suffix and PascalCase / snake_case variants.
Label
API names
Output appears here.
Related dictionary terms
Keep building
About this tool
When you create a field or object in Setup, Salesforce auto-generates the API name from the label by replacing spaces and punctuation with underscores, collapsing repeats, and trimming the ends. Guessing that name by hand before the metadata exists is fiddly, especially when you are writing the SOQL, Apex, or flow that references it. Type a label and this tool shows the exact API name Salesforce would produce, alongside the custom (__c) form and PascalCase / snake_case variants for code.
The tool trims the label, replaces every run of non-alphanumeric characters with a single underscore, strips leading and trailing underscores, and prefixes an X if the result would start with a digit (API names cannot begin with a number). That gives the base API name. The custom field/object variant appends the __c suffix. PascalCase strips the separators and capitalises each word for Apex class-style naming, and snake_case lowercases the words joined by underscores. Everything is derived locally from the text you type, live on each keystroke.
- Writing SOQL or Apex against a custom field before the field exists in the org, so the reference is correct the first time.
- Keeping field naming consistent across a team by pasting the proposed label and using the generated API name verbatim.
- Generating PascalCase or snake_case identifiers from a business label for an integration mapping or a code variable.