Skip to content
Latest: Publish JavaScript Packages to NPM Like a Pro!

fromCodePoint() JavaScript Method – How to Convert Unicode Code Point to String

Whenever you invoke fromCodePoint(), the method returns the string representation of its Unicode code point arguments.

fromCodePoint() accepts one or more arguments. Here is the syntax:

String.fromCodePoint(codepoint1, codepoint2, ..., codepointX)

The codepoint arguments represent the Unicode codepoints you wish to convert to string.

Below are examples of the fromCodePoint() method.

Convert one code point argument to a string

Section titled “Convert one code point argument to a string”
String.fromCodePoint(73);
// The invocation above will return: "I"

Try Editing It

The snippet above returned the string representation of Unicode code point 73.

Convert three code point arguments to string

Section titled “Convert three code point arguments to string”
String.fromCodePoint(73, 32, 128150);
// The invocation above will return: "I 💖"

Try Editing It

The snippet above returned the string representation of Unicode code points 73, 32, and 128150.

Convert sixteen code point arguments to string

Section titled “Convert sixteen code point arguments to string”
String.fromCodePoint(
73,
32,
128150,
32,
67,
111,
100,
101,
83,
119,
101,
101,
116,
108,
121,
33
);
// The invocation above will return:
// "I 💖 CodeSweetly!"

Try Editing It

The snippet above returned the string representation of fromCodePoint()’s arguments.