0x
0xkit.dev
/URL Encode / Decode

URL Encode / Decode

Percent-encode or decode URLs and query strings. Supports encodeURIComponent, encodeURI, and form encoding.

Plain Text0 bytes · 69 chars
Encoded Output
93 bytes
https%3A%2F%2F0xkit.dev%2Fsearch%3Fq%3Dhello%20world%26lang%3Den%26sort%3Drelevance%23results
URL Breakdown
protocolhttpshost0xkit.devpath/searchparams
q=hello world
lang=en
sort=relevance
hashresults
Input
69 chars
Output
93 chars
Encoded Chars
12
Method
Component
Size Δ
+24
encodeURIComponentEncodes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ). Use for query parameter values.
plain chars percent-encoded form space (+)

What is URL Encoding?

URL encoding (also called percent-encoding) replaces unsafe or reserved characters in a URL with a % followed by two hexadecimal digits representing the character's byte value. For example, a space becomes %20 and an ampersand becomes %26.

JavaScript provides two built-in functions: encodeURIComponent() encodes everything except unreserved characters, making it suitable for encoding query parameters. encodeURI() preserves URL structure characters like :/?#[]@, making it suitable for encoding full URLs.

The form encoding mode (application/x-www-form-urlencoded) follows the HTML specification for form submission, where spaces are encoded as + rather than %20.

Includes a URL breakdown that parses valid URLs into their components: protocol, host, path, query parameters, and fragment. Your data stays local.