Skip to main content


Disassemble a Hangul string into syllables, but group them by its original character.

Double consonants such as is disassembled into ['ㄴ', 'ㅈ']. Similarly, is disassembled into ['ㅗ', 'ㅏ'].

See below for detailed examples.

function disassembleHangulToGroups(
// The Hangul string to disassemble
str: string
): string[][];


disassembleHangulToGroups('값'); // [['ㄱ', 'ㅏ', 'ㅂ', 'ㅅ']]
disassembleHangulToGroups('토스 짱'); // [['ㅌ', 'ㅗ'], ['ㅅ', 'ㅡ'], [' '], ['ㅉ', 'ㅏ', 'ㅇ']]
disassembleHangulToGroups('ㅘ'); // [['ㅗ', 'ㅏ']]
disassembleHangulToGroups('ㄵ'); // [['ㄴ', 'ㅈ']]