Skip to main content

SF-0083 · Compare · Medium

Explain the difference between ISNULL() and ISBLANK()?

✓ Verified by Vikas Singhal · Last reviewed 5/17/2026 · Updated for Spring '26

ISNULL() and ISBLANK() look interchangeable until you point them at a text field. They handle empty strings differently, and that single difference is why Salesforce documentation tells you to use ISBLANK() for new formulas.

The one-line answer

  • ISNULL(field) returns TRUE only when the field is null. It returns FALSE for an empty text string ("").
  • ISBLANK(field) returns TRUE when the field is null or contains an empty string with no characters.

Why empty string vs null matters in Salesforce

Salesforce treats text fields specially. A blank Text or Text Area in the UI is stored as an empty string, not as null. So:

ISNULL(Description__c)   // returns FALSE — the field holds ""
ISBLANK(Description__c)  // returns TRUE  — handles "" as blank

For number, currency, date, datetime, percent, and checkbox fields, the two functions are functionally equivalent because those types can’t hold an empty string — they’re either null or have a value.

When to use which

Use ISBLANK() forUse ISNULL() for
Anything in new formulas — it’s the recommended functionBackwards compatibility with very old formulas you don’t want to touch
Text fields, Text Area, Email, URL, PhoneNever preferred, except in legacy code
Mixed-type comparisons where you might add a Text field later

Quick reference table

Field typeValueISNULL()ISBLANK()
TextnullTRUETRUE
Text"" (empty)FALSETRUE
Text"hello"FALSEFALSE
NumbernullTRUETRUE
Number0FALSEFALSE
CheckboxfalseFALSEFALSE — checkboxes are never blank

The interview trap

Candidates who say “they’re the same” fail this one. The interviewer will follow up: “What about a text field that’s been cleared?” The right answer is to call out the empty-string case and recommend ISBLANK() by default.

Bonus: BLANKVALUE vs NULLVALUE

The same logic applies to the value-substitution variants:

  • BLANKVALUE(field, default) returns default when the field is null or an empty text string
  • NULLVALUE(field, default) only kicks in when the field is null

Use BLANKVALUE for text, NULLVALUE is rarely the right call in modern formulas.

Verified against: Salesforce Help — ISBLANK vs ISNULL. Last reviewed 2026-05-17 for Spring ‘26 release.