DevRivet
Tools

URL Encoder / Decoder

Encode and decode URL/query-string components.

Your data stays in your browser. Nothing is uploaded to a server.

What is URL encoding?

URL encoding (percent-encoding) replaces characters that aren't safe inside a URL β€” spaces, &, =, and others β€” with a % followed by their hex code. This lets arbitrary text be safely embedded as a query parameter value or path segment.

How to use this tool

Choose Encode or Decode, then type or paste your text. This tool uses JavaScript's encodeURIComponent / decodeURIComponent β€” the right choice for encoding a single value (like a query parameter), since it escapes & and = too. If you needed to encode an entire URL while keeping its structure (like :// and ?) intact, you'd want encodeURI instead, which this tool does not use.

Example

Encoding name=John Doe&city=New York produces name%3DJohn%20Doe%26city%3DNew%20York.

FAQ

Why do I get an error when decoding?

Decoding fails when the input contains invalid percent-encoding, such as %ZZ or a truncated % sequence. Double-check you copied the full encoded string.