Skip to content

Menu

URL Escape Tool

Encode/decode URL components

Runs entirely in your browserEncodingFree, no sign-up
Loading tool

01What is URL Escape Tool?

This tool wraps JavaScript's built-in URL escaping functions behind one Mode dropdown, and picking the right mode is most of the work. The functions follow the percent-encoding rules from RFC 3986, writing each unsafe character as %XX for every byte of its UTF-8 form. Encode component (encodeURIComponent) escapes everything except letters, digits and - _ . ! ~ * ' ( ). So /, ?, &, = and # become %2F, %3F, %26, %3D and %23. That's what you want for one query value or one path segment, where those characters would otherwise change the meaning of the URL. Encode full URL (encodeURI) leaves the structural characters alone, including : / ? # [ ] @ & and =, and only escapes spaces, non-ASCII text and other unsafe characters. Use it on a complete URL that just needs to be valid. Decode tries decodeURIComponent first and falls back to decodeURI. Here's a worked example. Take a b&c=d/é in component mode and the output is a%20b%26c%3Dd%2F%C3%A9. Every separator is escaped, and é becomes its two UTF-8 bytes. Put https://x.com/a b?q=é&r=1#top through full URL mode and you get https://x.com/a%20b?q=%C3%A9&r=1#top. The path, query and fragment all stay readable. Both panes update as you type and show character counts, so you can see how much longer the encoded string gets. Reset clears the input. A few honest limits. Spaces become %20, never the + that HTML forms use, and Decode leaves a + as a literal plus sign. If you're reading form data, swap + for spaces before decoding. Malformed input, like a bare % in 100% or a multibyte sequence cut short, shows the message Invalid encoded URI rather than a half-decoded result. The decodeURI fallback rejects the same broken sequences, so in practice it doesn't rescue malformed input. Decoding runs one pass only, so double-encoded text needs a second go. The tool also can't tell you whether a URL is reachable or well formed beyond its escaping. Everything happens with the browser's own functions inside this page, so the links you paste, tokens included, aren't uploaded.

Web developers and API integrators who need to escape a single query value or tidy up a whole URL, and marketers building tracking links with special characters. The tool runs entirely in your browser, so your data never leaves your device.

02How to use URL Escape Tool

  1. Choose a Mode: Encode component, Encode full URL or Decode
  2. Paste your text or URL into Input
  3. Read the result in Output, or the error message if decoding fails
  4. Compare the character counts above each pane if length matters
  5. Click Copy to use the result, or Reset to start over

03Worked examples

Input: a b&c=d/é (Encode component (encodeURIComponent))
Result: a%20b%26c%3Dd%2F%C3%A9
&, = and / are all escaped, which is what you want for a single query value; é becomes its two UTF-8 bytes.
Input: https://x.com/a b?q=é&r=1#top (Encode full URL (encodeURI))
Result: https://x.com/a%20b?q=%C3%A9&r=1#top
The URL structure (:, /, ?, &, =, #) stays intact; only the space and é are encoded.
Input: John%20Doe%26role%3Dadmin (Decode)
Result: John Doe&role=admin
Input: a+b%20c (Decode)
Result: a+b c
A plus sign is not turned into a space; only %20 is. Form-encoded data that uses + for spaces needs that replaced first.
Input: 100% (Decode)
Result: Error: Invalid encoded URI. Check for malformed percent-encoding sequences.
A bare % not followed by two hex digits can't be decoded.
Input: https://app.test/cb?x=1 (Encode component (encodeURIComponent))
Result: https%3A%2F%2Fapp.test%2Fcb%3Fx%3D1
This is how a callback URL should look when it is the value of another URL's query parameter.

04Common use cases

  • Building a search link where the query contains &, = or # characters
  • Passing a callback URL as a query parameter in an OAuth redirect, where component mode turns https://app.test/cb?x=1 into https%3A%2F%2Fapp.test%2Fcb%3Fx%3D1
  • Reading a percent-encoded URL copied from server logs or analytics
  • Making a link with accented or emoji characters safe to paste into an email or Markdown file
  • Debugging double-encoded parameters like %2520 in an API request
  • Checking how much longer a value gets after encoding before it hits a URL length limit

05Tips

  • Encode each query value separately with component mode, then join them with & and =. Encoding a whole query string in component mode breaks it.
  • If you see %25 in a URL, something was encoded twice. Decode until the output stops changing.
  • application/x-www-form-urlencoded uses + for spaces. decodeURIComponent leaves + alone, so replace + with spaces first when decoding form data.
  • In code, URLSearchParams and the URL constructor handle most of this for you and avoid manual mistakes.

06Related concepts

percent-encoding, encodeURIComponent, query string, RFC 3986, URL decoding.

Frequently Asked Questions

What is URL Escape Tool?

URL Escape Tool is a free, browser-based developer tool on AIDToolStack. Encode/decode URL components It requires no installation or sign-up and works entirely in your browser.

Is URL Escape Tool free to use?

Yes. No sign-up, no fees and no usage cap.

Does URL Escape Tool store my data?

No. It runs in your browser; nothing is uploaded.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe