Skip to tool

Kotlin URL component encode Online

URL-encode a URI component.

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

Worked example

Encode one path segment or parameter value when separators such as slash and ampersand belong to the data.

Sample input
a b/c?d=e
Sample output
a%20b%2Fc%3Fd%3De

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