Url Encode Url Decode
More Tools
Other tools: Base64 Decode | Base64 Image Decoder | Base64 Encode | Base64 Image Encoder

PHP rawurlencode()

rawurlencode - Encodes the given url string

Function

string rawurlencode ( string $str )

Parameters

$str - The URL string to be encoded.

Return value

Returns a string in which all non-alphanumeric characters except dot (.), dash (-) , underscore (_) and tilde (~) have been replaced with a percent (%) sign followed by two hex digits.

Example
<?php
        $str = 'raw url encode';
        echo "http://example.com/?param=" . raurlencode( $str );
?>
Output
http://example.com/?param=raw+url+encode