StringUtils.isBlank() checks that each character of the string is a whitespace character (or that the string is empty or that it's null). This is totally different than just checking if the string is empty.

From the linked documentation:

Checks if a String is whitespace, empty ("") or null.

 StringUtils.isBlank(null)      = true
 StringUtils.isBlank("")        = true  
 StringUtils.isBlank(" ")       = true  
 StringUtils.isBlank("bob")     = false  
 StringUtils.isBlank("  bob  ") = false

For comparison StringUtils.isEmpty:

 StringUtils.isEmpty(null)      = true
 StringUtils.isEmpty("")        = true  
 StringUtils.isEmpty(" ")       = false  
 StringUtils.isEmpty("bob")     = false  
 StringUtils.isEmpty("  bob  ") = false

Warning: In java.lang.String.isBlank() and java.lang.String.isEmpty() work the same except they don't return true for null.

java.lang.String.isBlank() (since Java 11)

java.lang.String.isEmpty()

Answer from arshajii on Stack Overflow
🌐
GitHub
github.com › spring-cloud › spring-cloud-zookeeper › issues › 274
Replace usage of deprecated StringUtils.isEmpty with !StringUtils.hasLength · Issue #274 · spring-cloud/spring-cloud-zookeeper
December 4, 2020 - To keep behaviour exactly the way it is, !StringUtils.hasLength can be used to replace the current usage of StringUtils.isEmpty.
Published   Dec 04, 2020
🌐
Spring
docs.spring.io › spring-framework › docs › current › javadoc-api › org › springframework › util › StringUtils.html
StringUtils (Spring Framework 7.0.5 API)
public StringUtils() @Deprecated(since="5.3") @Contract("null -> true") public static boolean isEmpty · (@Nullable Object str) Deprecated. in favor of hasLength(String) and hasText(String) (or ObjectUtils.isEmpty(Object)) Check whether the given object (possibly a String) is empty.
🌐
GitHub
github.com › spring-projects › spring-framework › issues › 25945
Deprecate `StringUtils.isEmpty(Object)` and replace remaining usage (e.g. with `ObjectUtils.isEmpty`) · Issue #25945 · spring-projects/spring-framework
October 21, 2020 - If you are really keen on keeping this method it would be better to rename it to isEmptyString to at least make the error more obvious. (I believe this name also matches the method intention better than generic isEmpty.) But with the #17710 in place I do not think StringUtils.isEmpty(Object) is still needed.
Published   Oct 21, 2020
🌐
iO Flood
ioflood.com › blog › stringutils-isempty
StringUtils.isEmpty() in Java: Your Method Guide
March 27, 2024 - While StringUtils.isEmpty is a powerful tool for checking if a string is empty or null, Java provides other methods that can be used for the same purpose. These alternatives, such as the equals method or the length method of the String class, can ...
🌐
Kodejava
kodejava.org › how-do-i-check-for-an-empty-string
How do I check for an empty string? - Learn Java by Examples
" + StringUtils.isBlank(five)); // On the other side, the StringUtils.isNotBlank() methods complement // the previous method. It will check if a tested string is not empty. System.out.println("Is one not empty?
🌐
Baeldung
baeldung.com › home › java › java string › checking for empty or blank strings in java
Checking for Empty or Blank Strings in Java | Baeldung
January 8, 2024 - The most convenient way is to use Apache Commons Lang, which provides helpers such as StringUtils.isBlank. If we want to stick to plain Java, we can use a combination of String#trim with either String#isEmpty or String#length.
🌐
Apache Commons
commons.apache.org › lang › apidocs › org › apache › commons › lang3 › StringUtils.html
StringUtils (Apache Commons Lang 3.20.0 API)
public class StringUtils extends Object · Operations on String that are null safe. IsEmpty/IsBlank - checks if a String contains text · Trim/Strip - removes leading and trailing whitespace · Equals/Compare - compares two strings in a null-safe manner · startsWith - check if a String starts with a prefix in a null-safe manner ·
Find elsewhere
🌐
Buggybread
buggybread.com › 2014 › 02 › java-difference-between.html
Java - Difference between StringUtils.EMPTY and StringUtils.isEmpty()
StringUtils.EMPTY vs StringUtils.isEmpty() StringUtils.EMPTY is a final static member of StringUtil class that equates to "" i.e empty String. whereas · StringUtils.isEmpty() Checks if a String is empty ("") or null.
🌐
BytePlus
byteplus.com › en › topic › 498649
Stringutils isblank vs string isempty
Build better products, deliver richer experiences, and accelerate growth through our wide range of intelligent solutions. Core content of this page: Stringutils isblank vs string isempty
🌐
GitHub
github.com › terasolunaorg › terasoluna-gfw › issues › 1015
[Spring 5.3.0] StringUtils#isEmpty has bean deprecated · Issue #1015 · terasolunaorg/terasoluna-gfw
November 2, 2020 - with ObjectUtils.isEmpty) spring-projects/spring-framework#25945 ... Replace. from org.springframework.util.StringUtils#isEmpty to org.springframework.util.ObjectUtils#ObjectUtils.isEmpty
Published   Nov 02, 2020
🌐
Codez Up
codezup.com › home › stringutils.isempty() and stringutils.isblank() method in java
StringUtils.isEmpty() and StringUtils.isBlank() Method in Java | Codez Up
May 18, 2021 - Now you have an idea about the scenario where the StringUtils.isBlank() can be used and we can simply say that it is an alternative to the StringUtils.isEmpty() method of Java.
🌐
Medium
medium.com › dev-java › stringutils-isnotempty-vs-stringutils-isnotblank-in-java-491f10680879
Java String Checks: Understanding isNotEmpty vs isNotBlank | by Anil R | Dev Java | Medium
April 23, 2025 - When working with strings in Java, it’s common to perform checks to see whether a string is not empty or not blank. Apache Commons Lang provides two very useful utility methods for this: StringUtils.isNotEmpty() and StringUtils.isNotBlank().
🌐
Educative
educative.io › answers › what-is-stringutilsisempty-in-java
What is StringUtils.isEmpty in Java?
isEmpty() is a static method of the StringUtils class that is used to check if a given string is empty or not.
🌐
Apache Commons
commons.apache.org › proper › commons-lang › javadocs › api-2.6 › org › apache › commons › lang › StringUtils.html
StringUtils (Commons Lang 2.6 API)
This is similar to String.trim() ... stripChars String is null, whitespace is stripped as defined by Character.isWhitespace(char). Alternatively use strip(String)....
🌐
Apache Commons
commons.apache.org › proper › commons-lang › javadocs › api-3.9 › org › apache › commons › lang3 › StringUtils.html
StringUtils (Apache Commons Lang 3.9 API)
This is similar to String.trim() ... stripChars String is null, whitespace is stripped as defined by Character.isWhitespace(char). Alternatively use strip(String)....