Free URL Encoder and Decoder
Encode and decode URLs, break any link into its parts, build query strings and create clean UTM campaign links, all in one place.
URL Encoder and Decoder: Encode and decode URLs, break any link into its parts, build query strings and create clean UTM campaign links, all in one place. It is free, needs no sign-up and runs in your browser. How to use it: 1) pick a tab: encode or decode, parse, query builder or UTM builder; 2) paste your text or URL, or fill in the fields; 3) copy the result. The UTM builder updates as you type. URLs can only contain certain characters, so spaces, ampersands and non-English letters must be percent-encoded. The tool shows every common encoding at once so you can pick the right one.
How the URL encoder and decoder works
URLs can only contain certain characters, so spaces, ampersands and non-English letters must be percent-encoded. The tool shows every common encoding at once so you can pick the right one.
- encodeURIComponent: for a single value such as a search term or parameter. It encodes / ? and and signs too.
- encodeURI: for a complete URL. It keeps the characters that give a URL its structure.
- Form encoding: like encodeURIComponent, but spaces become plus signs, as in HTML form submissions.
Decoding reverses the process and warns you about malformed sequences.
URL parser and query builder
The parser splits a link into protocol, host, port, path, query string and fragment, and lists every parameter decoded. Send them to the query builder to edit, add or remove parameters and rebuild the URL.
UTM builder
Add utm_source, utm_medium, utm_campaign and optional term, content and ID tags. Values can be lowercased and spaces replaced automatically, existing parameters and the fragment are preserved, and you see how GA4 will report the visit.
Limitations
The parser follows the browser URL standard, so unusual formats may be normalised. Keep UTM tags off internal links because they overwrite the original traffic source.
About this tool
The URL Encoder and Decoder is built and maintained by the Hayyat Networks team, a digital marketing, SEO and web development agency working with businesses in New York and Lahore since 2016. It is part of our free Website Development Tools collection.
- Last reviewed
- CostFree, no sign-up
- Where it runsRuns in your browser
- Checking resultsThe method and a worked example are shown above, so you can verify every result.
- PrivacyIt runs entirely in your browser: what you type stays on your device and is never sent to us.
Spotted a problem or have an idea? Tell us and we will review it.
Link to this tool
Free to share in your blog, course notes or resource list. Copy the link below:
<a href="https://hayyatnetworks.com/free-tools/website-tools/url-encoder-decoder/">URL Encoder and Decoder</a> by Hayyat NetworksURL Encoder and Decoder FAQs
What is URL encoding?
URL encoding replaces characters that are not allowed in a web address with a percent sign followed by a code. A space becomes %20 and an ampersand becomes %26. This makes sure servers read each part of the URL correctly, especially query parameters.
When should I use encodeURIComponent instead of encodeURI?
Use encodeURIComponent for a single piece of a URL, such as a parameter value or path segment, because it also encodes slashes, question marks and ampersands. Use encodeURI only for a full address that already has the right structure. Encoding a full URL with encodeURIComponent would break it.
Why do spaces sometimes become plus signs?
HTML forms use a format called application/x-www-form-urlencoded, where spaces become plus signs. Most servers decode both + and %20 as spaces in query strings. In paths, a plus is a literal plus, so use %20 there. The query builder lets you choose either style.
What are UTM parameters?
UTM parameters are tags added to a link so analytics tools like GA4 know where a visit came from. The main three are source, medium and campaign. Use consistent lowercase values so reports do not split the same channel into several rows.
Want our experts to implement these improvements?
Get professional support from Hayyat Networks. Request a free consultation.
