Field API Name Generator

Paste field or object labels — one per line — and get API names that Salesforce will accept, ready to copy or download.

API names
  1. Names appear here as you type.

Runs in your browser — nothing you paste is sent to us or stored.

How to use it

  1. 1

    Pick what you’re creating

    A custom field or object (__c), a custom metadata type (__mdt) or a platform event (__e). Add your namespace if you build a managed package.

  2. 2

    Paste your labels

    One per line — straight from a design sheet or a requirements doc. Names update as you type.

  3. 3

    Check the notes, then copy

    Shortened, renamed or duplicate names are flagged. Copy every API name, or download a CSV with the label next to it.

Questions

What are the rules for a Salesforce API name?

The name before the suffix may contain only letters, numbers and underscores. It must start with a letter, can’t end with an underscore, can’t have two underscores in a row, and can be at most 40 characters. It also has to be unique on the object — and Salesforce ignores case, so Region__c and region__c clash.

Does this give the same name Salesforce would suggest?

For most labels, yes: Setup also turns spaces and symbols into underscores and puts an “X” in front of a name that starts with a number. This tool goes further where Setup would just refuse the name: it removes accents, merges repeated underscores, shortens long names to 40 characters and numbers duplicates.

Why do custom fields end in __c?

The suffix tells Salesforce, and anyone reading your code, what kind of thing it is: __c for custom fields and objects, __mdt for custom metadata types, __e for platform events, __r for a relationship. Your SOQL and Apex always use the full API name with the suffix.

Can I change an API name after the field is created?

You can edit the Field Name in Setup, but anything that refers to the old name — Apex, flows, formulas, reports, integrations — has to be updated too, and Salesforce blocks the change when Apex refers to the field. That’s why it pays to agree the names before you build.

What is the namespace for?

Managed packages put their namespace in front of every API name, like acme__Region__c, so their fields can’t clash with the subscriber’s own. Leave it empty for fields you create directly in an org.

Is my data sent anywhere?

No. The names are built in your browser; nothing you paste is sent to Metrinfo or stored.

Further reading

Want to go beyond the tools?

Learn Salesforce administration — from beginner to certified — live classes with people who build on Salesforce every day.

See the learning path →