URL Encoder/Decoder

Encode and decode URLs, handling special characters and Unicode properly.

Input

Output

Encoded/decoded URL will appear here...

Character Analysis

Character analysis will appear here...

URL Components (when applicable)

Protocol: -
Host: -
Port: -
Path: -
Query: -
Fragment: -

URL Encoding Explained

Characters That Need Encoding

%20 Space character
%3F Question mark (?)
%26 Ampersand (&)
%3D Equals sign (=)
%2B Plus sign (+)
%23 Hash symbol (#)

When to Use Encoding

Query Parameters

Encode special characters in URL query strings

name=John%20Doe&city=New%20York

Form Data

Encode form field values before submission

email=user%40example.com

API Calls

Encode parameters in API endpoint URLs

/api/search?q=hello%20world

Encoding Methods

encodeURI()

Encodes entire URI, preserving characters like :, /, ?, #

encodeURI("http://example.com/path with spaces?query=value")

Result: http://example.com/path%20with%20spaces?query=value

encodeURIComponent()

Encodes URI components, including :, /, ?, #

encodeURIComponent("hello world?")

Result: hello%20world%3F

Quick Examples