Skip to tool

Kotlin Split into chunks Online

Split text into fixed-length chunks.

The output updates as you type. The tool processes input in your browser.

Worked example

Chunks have a fixed width and can break across words. Use word wrap when word boundaries need to be kept.

Chunk length
3
Chunk ending
"\\n"
Sample input
manualsplus
Sample output
man\nual\nspl\nus\n

Using this operation in Kotlin

The interactive result uses JavaScript. Kotlin String APIs expose character indexes and case conversion. Check whether your code targets JVM, JS, Native, or Wasm when depending on platform-specific utilities.

Kotlin reference