Phrasit

Search Phrasit

Search every tool, guide, and citation page.

FREE / URL / PERCENT ENCODING

URL encoder decoder

Encode and decode URL components with browser-native percent encoding, error handling, encoded-input detection, and one-click copying.

About the URL encoder

URLs may only contain a limited set of characters, so spaces, ampersands, question marks, slashes, and anything non-ASCII have to be percent-encoded: each unsafe byte becomes a % followed by two hex digits. This tool encodes text into that form and decodes it back, which is exactly what you need when a query string, a redirect target, or a piece of user input has to ride safely inside a link.

It encodes at the component level, meaning it escapes the reserved characters that delimit a URL (such as &, =, ?, #, and /) so a value can sit inside a single query parameter without being misread as structure. Use it to build a correct link, or to make a captured URL readable when it is full of %20 and %3D sequences.

How to use it

  1. Choose Encode or Decode at the top.
  2. Paste your text or URL into the input panel; the output appears as you type.
  3. Click Detect to let the tool guess the right mode by checking whether the text already contains percent-escapes.
  4. Read the result, or the error message if a malformed sequence cannot be decoded.
  5. Click Copy to grab the output.

Examples

Encode a value for a query parameter

Encoding name=Phrasit&redirect=/tools/json-formatter turns the space into %20 and the & and = and / into %26, %3D, and %2F. That matters because an unescaped & would be read as a parameter separator, splitting your single value into several and breaking the link.

Decode a captured link

Paste search?q=hello%20world%21 and decode to recover q=hello world!. The %21 is the exclamation mark and %20 is the space. Decoding is how you make a logged or copied URL human-readable when every special character has been escaped.

Let Detect choose the direction

Click Detect on a string. If it spots a %hh pattern it assumes the text is already encoded and switches to Decode; otherwise it switches to Encode. It saves a step when you are pasting an unknown value and are not sure which way it needs to go.

Frequently asked questions

What is percent-encoding?
It is the URL escaping scheme where any character that is not allowed literally is replaced by % and the two-digit hexadecimal value of its byte. A space becomes %20, an at sign becomes %40. Multi-byte UTF-8 characters become several percent groups in a row.
Does this encode the whole URL or just a value?
It encodes a component, escaping the reserved delimiters &, =, ?, #, and / so a value stays intact inside one part of a URL. If you escaped a whole assembled URL this way, its own slashes and separators would be encoded too and the link would no longer work as structure.
Which characters are left untouched?
The unreserved set stays literal: letters A-Z and a-z, digits 0-9, and the marks hyphen, underscore, period, and tilde. Everything else, including spaces and reserved delimiters, is percent-encoded so it cannot be confused with URL syntax.
Why did my decode throw an error?
A malformed percent-escape, like a lone % or %ZZ that is not valid hex, cannot be decoded and raises an error. Make sure every % is followed by exactly two hex digits, and that nothing was truncated when the string was copied.
Is %20 the same as a plus sign for spaces?
Not quite. In a percent-encoded path or value a space is %20. The + as a space is a separate convention specific to application/x-www-form-urlencoded form data. This tool produces %20, which is safe across both paths and query values.

Good to know

The reserved characters matter because they carry meaning in a URL: ? starts the query, & separates parameters, = pairs a key with a value, # begins the fragment, and / divides path segments. If a value you insert contains any of them it must be encoded so the parser treats it as data rather than punctuation, which is the single most common cause of broken redirect and callback links.

Encode each piece of data before you concatenate it into a URL, not the finished URL afterward. Double-encoding is a frequent bug: a value escaped twice shows up as %2520 instead of %20 because the % itself got encoded, so if you see %25 where you expected %, something escaped an already-escaped string. For non-ASCII text, remember one visible character can expand into several percent groups, since UTF-8 encodes it as multiple bytes.

Related tools