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
🌐
Baeldung
baeldung.com › home › java › java string › difference between string isempty() and isblank()
Difference Between String isEmpty() and isBlank() | Baeldung
December 2, 2025 - >> Flexible Pub/Sub Messaging With Spring Boot and Dapr · Working with Strings in Java is sometimes confusing because we have many ways to do similar things. In this article, we’ll look at how to validate blank and empty Strings using the isEmpty() and isBlank() methods.
🌐
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.
🌐
Java Guides
javaguides.net › 2023 › 09 › java-string-isblank.html
Java String isBlank()
September 9, 2024 - The isBlank() method is a part of the String class in Java. Introduced in Java 11, this method is used to check whether a given string is blank or not
🌐
Java Guides
javaguides.net › 2024 › 01 › string-isempty-vs-isblank-in-java.html
String isEmpty() vs String isBlank() in Java
June 15, 2024 - Blog about guides/tutorials on Java, Java EE, Spring, Spring Boot, Microservices, Hibernate, JPA, Interview, Quiz, React, Angular, Full-Stack, DSA
🌐
Medium
medium.com › @AlexanderObregon › javas-string-isblank-method-explained-be7064a144a7
Java’s String.isBlank() Method Explained | Medium
January 10, 2025 - The introduction of isBlank() eliminates the need for repetitive code patterns that involve trimming strings or writing custom checks to handle whitespace scenarios.
🌐
Medium
sanjaysingh-dev.medium.com › why-every-java-developer-should-know-stringutils-real-world-use-cases-explained-51cf27633060
Why Every Java Developer Should Know StringUtils: Real-World Use Cases Explained | by Sanjay Singh | Medium
April 8, 2025 - Avoid NullPointerException when working with strings. Simplify common string operations with reusable, tested methods. Use isBlank() instead of isEmpty() when whitespace handling matters.
Find elsewhere
🌐
Educative
educative.io › answers › what-is-stringutilsisnotblank-in-java
What is StringUtils.isNotBlank in Java?
isNotBlank() is a static method of the StringUtils class that is used to check if a given string is not blank · If a string does not satisfy any of the criteria below, then the string is considered to be not blank
🌐
Tutorialspoint
tutorialspoint.com › home › java/lang › java string isblank method
Java String isBlank Method
September 1, 2008 - If the given string is empty, and contains only whitespaces then the isBlank() method returns true.
🌐
Blogger
javarevisited.blogspot.com › 2016 › 01 › how-to-check-if-string-is-not-null-and-empty-in-java-example.html
How to check if String is not null and empty in Java? Example
Sometimes you need to use the trim() method if your program's requirement doesn't consider a String with the only whitespace as non-empty, but other times, you might want to use the length() function to consider String with just whitespaces as empty String in Java. As suggested by others, if you are using Google Guava, Spring, or Apache commons then just check their StringUtils class, you might get a method that does this for you like StringUtils.isBlank() from Apache Commons.
🌐
GitHub
github.com › spring-projects › spring-framework › blob › main › spring-core › src › main › java › org › springframework › util › StringUtils.java
spring-framework/spring-core/src/main/java/org/springframework/util/StringUtils.java at main · spring-projects/spring-framework
public static boolean hasText(@Nullable String str) { return (str != null && !str.isBlank()); } · /** * Check whether the given {@code CharSequence} contains any whitespace characters. * @param str the {@code CharSequence} to check (may be {@code null}) * @return {@code true} if the {@code CharSequence} is not empty and ·
Author   spring-projects
🌐
HowToDoInJava
howtodoinjava.com › home › java 11 › java string isblank() – check blank or empty string
Java String isBlank() - Check Blank or Empty String
December 12, 2022 - In other words, a String with only white space characters is blank but not empty. "ABC".isBlank() //false " ".isBlank() //true "ABC".isEmpty() //false " ".isEmpty() //false · Happy Learning !! ... A fun-loving family man, passionate about computers and problem-solving, with over 15 years of experience in Java and related technologies.
🌐
Hashnode
sudarshandoiphode.hashnode.dev › isblank-vs-isempty-which-one-should-you-choose
isBlank() vs. isEmpty() – Which One Should You Choose?
December 10, 2023 - isBlank() returns true if the length of the string is zero or it contains whitespaces only or escape sequence characters. Introduction: While working with Spring Boot applications, most of the times we need to externalize configurations into ...
🌐
Spring
docs.spring.io › spring-framework › docs › current › javadoc-api › org › springframework › util › StringUtils.html
StringUtils (Spring Framework 7.0.5 API)
Mainly for internal use within the framework; consider Apache's Commons Lang for a more comprehensive suite of String utilities. This class delivers some simple functionality that should really be provided by the core Java String and StringBuilder classes.
🌐
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 - Java String Checks: Understanding isNotEmpty vs isNotBlank 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 …
🌐
Educative
educative.io › answers › what-is-stringutilsisblank-in-java
What is StringUtils.isBlank in Java?
isBlank() is a staticthe methods in Java that can be called without creating an object of the class. method of the StringUtils which is used to check if the given string is blank · If a string satisfies any of the criteria below, then the string ...
🌐
Apps Developer Blog
appsdeveloperblog.com › home › java › check if a string is null, empty or blank in java
Check if a String is Null, Empty or Blank in Java
June 4, 2023 - On the other hand, the isBlank() method, introduced in Java 11, not only checks for an empty string but also considers a string as blank if it contains only whitespace characters.