Encode and decode URLs and URI components for web development and data transmission.
URL encoding, also called percent-encoding, escapes characters that have a special meaning in a URL so that data survives transport intact. Characters such as spaces, ampersands, and question marks are replaced with a percent sign followed by their hexadecimal byte value — a space becomes %20, for example. This keeps query strings, path segments, and form data from being misread by browsers and servers.
This tool encodes and decodes in two modes. Component mode uses encodeURIComponent, which escapes structural characters like &, =, ?, and /, making it the right choice for a single query value or path segment. Full URI mode uses encodeURI, which encodes an entire URL while leaving structural characters such as :, /, ?, and # intact so the address still works as a whole.
Everything runs locally in your browser — nothing you paste is uploaded or stored. Decoding reports malformed percent sequences clearly instead of failing silently, and the Swap button lets you feed the output back in to reverse the operation.
Component mode (encodeURIComponent) escapes structural characters like &, =, ?, and /, so it is right for a single query value or path segment. Full URI mode (encodeURI) encodes a whole URL but leaves those structural characters intact.
Spaces are not allowed in URLs, so they are percent-encoded. The percent sign followed by the character's hexadecimal byte value (20 for a space) lets the space travel safely inside a URL.
Use Component mode. It escapes the &, =, and ? characters that would otherwise be read as query-string separators, keeping your value intact.
The tool detects invalid percent sequences and reports an error instead of returning corrupted text, so you can spot the problem in your input.
No. Encoding and decoding run locally in your browser using the built-in JavaScript functions, so nothing you enter leaves your device.