Skip to content

urldecode

Collection Note

This module is part of the ansible.builtin collection. To install the collection, use:

ansible-galaxy collection install ansible.builtin
Added in version 2.4.

Synopsis

  • Replace %xx escapes with their single-character equivalent in the given string.
  • Also replace plus signs with spaces, as required for unquoting HTML form values.

Parameters

Parameter Defaults / Choices Comments
_input
str
required
URL encoded string to decode.

Examples

# Decode urlencoded string
{{ '%7e/abc+def' | urldecode }}
# => "~/abc def"

# Decode plus sign as well
{{ 'El+Ni%C3%B1o' | urldecode }}
# => "El NiƱo"

Return Values

Key Data Type Description Returned
_value any URL decoded value for the given string