Java Character isSupplementaryCodePoint() Method

Beginner
5 min read
Updated: Nov 2026
3 examples
java.lang.Character

Definition

In Java, Character.isSupplementaryCodePoint(codePoint) returns true when the code point is a supplementary one: from 0x10000 to 0x10FFFF. Such characters do not fit in one char and are stored as a surrogate pair.

Most emoji, many historic scripts, mathematical alphanumeric symbols, and rare CJK ideographs are supplementary. If your code assumes "one char = one character", these are the characters that break it.

A static method of java.lang.Character (Java 5+): call it on the class, as in Character.isSupplementaryCodePoint(...); you do not need a Character object. No import is needed, because java.lang is always available.

Syntax

Pass an int code point.

Java
Character.isSupplementaryCodePoint(0xFFFF);     // false, still in the BMP
Character.isSupplementaryCodePoint(0x10000);    // true, the first one
Character.isSupplementaryCodePoint(0x1F600);    // true, an emoji
Character.isSupplementaryCodePoint(0x110000);   // false, not a code point
CallWhat it does
Character.isSupplementaryCodePoint(s.codePointAt(i))Does the character at i take two chars?
s.codePoints().filter(cp -> Character.isSupplementaryCodePoint(cp)).count()Count supplementary characters (Java 8 streams).
cp >= 0x10000 && cp <= 0x10FFFFThe same check written out.

One overload, isSupplementaryCodePoint(int codePoint), available since Java 5. The constant Character.MIN_SUPPLEMENTARY_CODE_POINT holds 0x10000.

Library declarations
Java
// java.lang.Character (since Java 5)
public static boolean isSupplementaryCodePoint(int codePoint)

public static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x010000;

Parameters

ParameterDescription
codePoint (int)The code point to check.

Return Value

Return ValueDescription
true0x10000 to 0x10FFFF inclusive.
falseBMP code points, negative numbers, and values above 0x10FFFF.

Compare with Similar Methods

Related checks:

MethodHow it differs
isBmpCodePoint(cp)The other half of the range (Java 7+).
charCount(cp)Returns 2 for these, but also for invalid values above 0x10FFFF.
isSurrogatePair(high, low)Checks two chars rather than one code point.

Java Examples

Example 1 — Where the Supplementary Range Starts and Ends

Check values on both sides of 0x10000 and 0x10FFFF.

Java
public class CharacterIsSupplementaryTable {
    public static void main(String[] args) {
        int[] cps = {0xFFFF, 0x10000, 0x1F600, 0x10FFFF, 0x110000};
        for (int cp : cps) {
            System.out.println("0x" + Integer.toHexString(cp) + " supplementary="
                    + Character.isSupplementaryCodePoint(cp));
        }
    }
}

How It Works

  1. Lower edge. 0xFFFF is the last BMP value, so it is not supplementary; 0x10000 is the first that is.
  2. Upper edge. 0x10FFFF is the largest code point and is still supplementary; 0x110000 is outside Unicode.
  3. An emoji in between. U+1F600 sits in plane 1, well inside the range.

Example 2 — Count Characters That Need Two chars

Use the Java 8 codePoints() stream to count supplementary characters in a chat message.

Java
public class CharacterIsSupplementaryCount {
    public static void main(String[] args) {
        String msg = "ok \uD83D\uDC4D done \uD83D\uDE00";
        long supplementary = msg.codePoints()
                .filter(cp -> Character.isSupplementaryCodePoint(cp))
                .count();
        System.out.println("chars=" + msg.length()
                + " codePoints=" + msg.codePointCount(0, msg.length())
                + " supplementary=" + supplementary);
    }
}

How It Works

  1. Two emoji. \uD83D\uDC4D is THUMBS UP SIGN (U+1F44D) and \uD83D\uDE00 is U+1F600; each is a surrogate pair.
  2. A stream of ints. codePoints() (Java 8) already joins pairs, so the filter sees whole code points and keeps the two emoji.
  3. The numbers fit together. 13 chars minus one extra char per supplementary character gives the 11 code points.

Example 3 — isSupplementaryCodePoint and charCount on Valid and Invalid Values

For valid code points the two methods agree; for an out-of-range value they do not.

Java
public class CharacterIsSupplementaryVsCharCount {
    public static void main(String[] args) {
        int[] values = {0x41, 0x1D11E, 0x110000};
        for (int v : values) {
            System.out.println("0x" + Integer.toHexString(v)
                    + " supplementary=" + Character.isSupplementaryCodePoint(v)
                    + " charCount=" + Character.charCount(v));
        }
    }
}

How It Works

  1. A BMP letter. 'A' (0x41) is not supplementary and needs 1 char.
  2. A real supplementary character. MUSICAL SYMBOL G CLEF (0x1D11E) is supplementary and needs 2 chars.
  3. Disagreement on invalid input. 0x110000 is not a code point, so isSupplementaryCodePoint says false, while the unchecked charCount still says 2.

Frequently Asked Questions

A code point from U+10000 to U+10FFFF. In a Java String it is stored as two chars: a high surrogate followed by a low surrogate.
No. Many are (U+1F300 and up), but some older symbols used as emoji, such as U+2764, are in the BMP.
On Java 8: s.codePoints().filter(cp -> Character.isSupplementaryCodePoint(cp)).count(). Or loop with codePointAt and charCount.
A constant in Character equal to 0x10000, the first supplementary code point.
Only for valid code points. charCount does not validate, so it returns 2 for values above 0x10FFFF too.

Next: isSurrogate()

Check whether a char is either half of a surrogate pair (Java 7+).

isSurrogate() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

13 people found this page helpful