You copy a link out of a browser and half of it looks like this: hello%20world%20%26%20more. Or you build a link by hand, put a search phrase with spaces and an ampersand into it, and the address quietly breaks: the server sees two parameters where you meant one value. Both problems come from the same rule. A web address can only carry certain characters raw, and everything else has to be percent-encoded.

This guide shows how to encode and decode strings with the free URL Encoder/Decoder on Ovatly, how to choose between its two modes, and how to read encoded text when you meet it. The work happens in your browser, and one honest point runs through the whole guide: encoding is not encryption, and an encoded string is readable by anyone.

Contents

  • Quick answer
  • Why URLs need encoding
  • Component mode and full URL mode
  • How to encode and decode a string, step by step
  • Worked example: a search phrase and a whole address
  • Limitations and honest warnings
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

To encode a string, open the URL Encoder/Decoder, choose Component mode for a single value going into a query string or Full URL mode for a whole address, paste your text, and press Encode. To decode, paste the percent-encoded string and press Decode. In component mode the tool encodes everything a URL cannot carry raw, including &, =, ? and /. Full URL mode encodes spaces and stray characters while deliberately leaving the structural characters alone. Invalid input on decode, such as a stray %, produces a clear error instead of garbage.

Why URLs need encoding

A URL is a structured string, and some characters are reserved as its punctuation. In a query string, & separates one parameter from the next, and = separates a name from its value. If the value you are carrying contains those characters as ordinary text, the structure and the content collide: a raw & inside a search phrase would start a new parameter, and the value would be cut in two.

Other characters simply cannot travel raw at all. A space is the everyday example. Percent-encoding replaces each unsafe character with a % followed by two digits, so a space becomes %20 and an ampersand becomes %26. The encoded form is safe in any address, and decoding reverses it exactly.

Component mode and full URL mode

Choosing the right mode is the one real decision in this tool, and it depends on what you are pasting.

Component mode is for a single value going into a query string: a search term, a redirect target, one parameter's worth of text. It encodes everything a URL cannot carry raw, including &, =, ? and /, because inside one value none of those characters may keep their structural meaning.

Full URL mode is for a whole address. It encodes spaces and stray characters while keeping the address structure intact, so the ://, the path separators and the ? and & that organise the address stay as they are. Deliberately leaving the structural characters alone is the point of the mode: run a whole address through component mode and you would encode the very punctuation that makes it an address.

How to encode and decode a string, step by step

  1. Open the URL Encoder/Decoder.
  2. Choose Component mode for a query value, or Full URL mode for a whole address.
  3. Paste your text or URL.
  4. Press Encode or Decode.
  5. Copy the result.

Worked example: a search phrase and a whole address

The tool's own example uses component mode on a search phrase. Encoding "hello world & more" gives:

hello%20world%20%26%20more

Each space became %20. The ampersand became %26, and that is the important one: in a query string a raw & would start a new parameter, so leaving it unencoded would split the phrase into two values and silently break the link.

The second half of the example uses full URL mode. The address https://example.com/a b?q=x y becomes https://example.com/a%20b?q=x%20y. The spaces are encoded, in the path and in the query value alike, while the structure of the address is preserved: the scheme, the slashes, the ? and the = all stay raw, exactly as an address needs them.

Decoding runs the same examples backwards. Paste hello%20world%20%26%20more, press Decode, and you get "hello world & more" back, character for character.

Limitations and honest warnings

Encoding is not encryption. Anyone can decode a percent-encoded string with this same tool, so never treat encoding as a way to hide a value in a link. If a link carries something sensitive, the problem is the link, not the encoding.

Encoded text is longer than the original. Each unsafe character becomes three characters, like %20 for a space, and non-ASCII characters take even more, since they are encoded as their UTF-8 bytes. Long values in several languages can grow a link quickly, which is worth remembering when a platform enforces a URL length limit.

One ambiguity deserves care. In query strings produced by form submissions, + means a space. This tool uses %20, which is valid everywhere in a URL, to avoid ambiguity. When you decode a string that came from a form submission, keep that difference in mind: a + in it likely stood for a space, while in other parts of a URL it can be a literal plus sign.

Finally, decoding expects well-formed input. A stray % or an incomplete %2 at the end produces a clear error instead of garbage, which is the tool telling you the string was probably truncated or was never fully encoded.

Common mistakes

  • Using full URL mode on a query value. The structural characters stay raw, so an & inside your value will still split the parameter.
  • Using component mode on a whole address. The punctuation that makes the address work gets encoded, and the link breaks.
  • Assuming %20 and + are interchangeable everywhere. The + convention belongs to form-submitted query strings; %20 is valid everywhere.
  • Treating an encoded value as hidden. It is not. Anyone can decode it with the same tool.
  • Decoding a string twice. Text that was encoded once only needs one decode; a second pass can mangle characters that legitimately contain a %.

FAQs

Which mode do I need? If you are building one value inside a URL, like a search term or a redirect target, use Component. If you have a whole address with a space in it, use Full URL.

Why did my encoded text get longer? Each unsafe character becomes three characters, like %20 for a space. Non-ASCII characters take even more, since they are encoded as their UTF-8 bytes.

Is + the same as %20? In query strings produced by form submissions, + means a space. This tool uses %20, which is valid everywhere in a URL, to avoid ambiguity.

What happens if I decode a string with a broken percent sequence? Decoding invalid input, like a stray % or an incomplete %2 at the end, produces a clear error instead of garbage.

Does percent-encoding hide my data? No. Encoding is not encryption. Anyone can decode a percent-encoded string with this same tool.

Conclusion

Percent-encoding is a small skill that removes a whole class of broken links: pick component mode for a single value, full URL mode for a whole address, and let the URL Encoder/Decoder handle the character-by-character work. When you meet an encoded string, the same tool reads it back for you, and it will tell you plainly when the input is broken rather than guessing. Its sibling encoding is covered in How to Decode a Base64 String, and more guides like this one live in the Developer Tools archive.