URL Encoder / Decoder
The URL Encoder / Decoder converts text into percent-encoded URL format and decodes encoded URLs back to readable text, with a clear message when a string is malformed. It supports encodeURIComponent and encodeURI, form-style + for spaces, and breaks any full URL into its protocol, host, port, path, query parameters and fragment. Everything runs locally in your browser.
Encode or decode
For one query value or path segment: encodes everything except letters, digits and - _ . ! ~ * ' ( ).
application/x-www-form-urlencoded uses + for spaces in query strings.
Caf%C3%A9%20%26%20cr%C3%A8me%3A%2050%25%20off%20%2F%20today%20only%3FURL breakdown
- Protocol
- https:
- Host
- shop.example.com
- Port
- 8443
- Path
- /products/running%20shoes
- Path segments
- products / running shoes
- Query
- ?color=red&size=9&q=trail+runner&utm_source=newsletter
- Fragment
- #reviews
- Origin
- https://shop.example.com:8443
| Parameter | Decoded value |
|---|---|
| color | red |
| size | 9 |
| q | trail runnerraw: trail+runner |
| utm_source | newsletter |
How to use
- Choose encodeURIComponent, encodeURI or Decode, then type or paste your text.
- Turn on + for spaces if you're working with form data or query strings.
- The result updates as you type; malformed input shows exactly which escape is broken and where.
- Paste a full URL into the breakdown to see each part and every query parameter decoded.
Why use this tool?
Frequently asked questions
What is the URL Encoder / Decoder?
A free online tool that converts text to percent-encoded URL format or reverses the process, decoding encoded URLs back into plain readable strings. It runs entirely in your browser with no data sent to any server.
What is the difference between encodeURIComponent and encodeURI?
encodeURIComponent encodes nearly all special characters, including slashes, colons and question marks, which makes it right for a single query parameter value or path segment. encodeURI leaves the characters that structure a URL (such as : / ? # & =) untouched, so it suits a complete URL. For most query string and API work, encodeURIComponent is the correct choice.
Why does decoding fail?
Decoding fails when a % isn't followed by two hex digits (a literal % is written %25) or when the escaped bytes aren't valid UTF-8, which usually means the text was encoded in another character set such as Latin-1. The error shows the exact sequence and its position.
Is it free?
Yes, the URL Encoder / Decoder is free with no signup required. It runs entirely in your browser, so nothing you paste is uploaded. Built by the Canvas Builder team.
Stop tweaking snippets. Build the whole site
This tool fixes one piece. Canvas Builder builds the entire page from a single prompt: sections, copy, styling, and responsive layout. You own the code.