Dev Tools/URL Encoder / Decoder

URL Encoder / Decoder

Encode or decode URLs and query string parameters.

encodeURIComponent encodes all special characters — use for query string values.

Decoded (Plain Text)

Encoded

What is URL Encoding?

URL encoding (also called percent-encoding) converts special characters into a format safe for transmission in URLs. Characters like spaces, ampersands, question marks, and non-ASCII characters are replaced with a percent sign followed by their hexadecimal value (e.g., a space becomes %20). This ensures URLs are valid and parsed correctly by browsers and servers.

JavaScript provides two levels of encoding: encodeURIComponent() encodes almost all special characters and is the right choice for encoding individual query string values. encodeURI() preserves URL structure characters like :, /, ?, and #, making it suitable for encoding an entire URL without breaking its structure. This tool supports both modes so you can pick the one that fits your use case.