--- title: "encodeURIComponent" slug: "calc-function-encode-uri-component" updated: 2026-05-12T12:29:06Z published: 2026-05-12T12:29:06Z canonical: "docs.lobstersoftware.com/calc-function-encode-uri-component" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # encodeURIComponent *See also:* [decodeURIComponent](/v1/docs/en/calc-function-decode-uri-component) > [!NOTE] > Encodes special characters and URI format characters with appropriate wildcards so that a text can be transmitted securely as part of a URL.For example, a space becomes "%20", a colon becomes "%3A", an ampersand becomes "%26", etc. > > > [!TIP] > > Tooltip > > > > Syntax: *$encodeURIComponent(text)* > > > > | Parameter | Description | > > | --- | --- | > > | `text` | The text with which the URI will be securely encoded | > > > > Example: $encodeURIComponent(This text is URI secure & can be used in a URL!)Delivers "This%20text%20is%20URI%20secure%20%26%20and%20can%20be%20%used%20in%20a%20URL!" ## Syntax *$encodeURIComponent(text)* ## Parameter | Name | Description | | --- | --- | | text | The text with which the URI will be securely encoded. | ## Return value The coded text. ## Example | Syntax | Result | | --- | --- | | http://anydomain.com/?p=$encodeURIComponent(This text is URI secure? Yes: Because it is encoded accordingly!) | http://anydomain.com/?p=Dieser%20Text%20ist%20URI%20sicher%3F%20Ja%3A%20Weil%20er%20entsprechend%20kodiert%20wird! |