Toolsky

Free Online Tools & Utilities for Every Task.

URL Encoder

Encode your URL to make them transmission-safe.

A link that works on your screen can quietly fall apart in transit. Spaces break it in an email, an ampersand inside a product name gets mistaken for a parameter separator, and an accented letter turns into mojibake at the far end. The URL Encoder on ToolSky makes your URLs transmission-safe: it rewrites every character that a URL cannot carry plainly into its percent-encoded form, so the address that arrives is exactly the address you meant to send.

Why URLs Need Encoding in the First Place

The URL specification, RFC 3986, divides characters into those a URL may contain as they are, those reserved for structural jobs like separating parameters, and everything else, which must be encoded. A space has no place in an address, a ? starts the query string, an & separates one parameter from the next, and a # begins the fragment. When those same characters appear inside your data, a page name containing an ampersand, a search phrase containing a question mark, they must be disguised as percent codes, such as %26 for &, so the receiving server can tell structure from content.

Encoding is not decoration or security. It is the addressing system's way of making sure a value survives being parsed, and skipping it produces the classic bugs: searches cut in half at the first space, parameters silently merging, links that work for English text and break for everyone else.

What the URL Encoder Takes Care Of

  • Spaces, punctuation and symbols inside URLs, converted to their correct percent forms.
  • Complete addresses or single query values, depending on whether you are sharing a finished link or building one inside an application.
  • Non-English text, encoded as UTF-8 byte sequences so names and words in any language travel intact.

Encoding is the writing half of the job; the URL Decoder reverses it for reading, and the URL Parser will break a finished address into its components so you can check that each parameter landed where it belongs.

How to Encode a URL

  1. Copy the URL or the individual value, such as a search term or file name, that needs to travel safely.
  2. Paste it into the encoder's input field.
  3. Run the encode action.
  4. Review the output: structural characters you supplied as data should now appear as percent codes.
  5. Copy the encoded result into your link, code, QR target or message.
  6. Test the finished link once, end to end, before publishing or sending it widely.

Encoding a Messy Link, Step by Step

Imagine a café linking to its specials page with the address https://example.com/menu items/daily special?dish=fish & chips. As written, it is three accidents waiting to happen: two spaces and a naked ampersand. Encoded properly it becomes https://example.com/menu%20items/daily%20special?dish=fish%20%26%20chips. The spaces turned into %20, and critically, the ampersand inside the dish name became %26, so the server reads one parameter, dish, whose value is the whole phrase "fish & chips", instead of a dish called "fish " followed by a mystery parameter. The question mark and equals sign stayed untouched because they are doing structural work. That distinction, encode the data, preserve the structure, is the whole craft.

Encoder Habits That Prevent Broken Links

The costliest mistake is encoding a URL that is already encoded. Percent signs get encoded again, %20 becomes %2520, and the server decodes once to find a literal %20 inside your file name. Encode once, at the moment you build the link, and treat any string already containing percent codes as encoded until proven otherwise. The second habit concerns scope: when constructing a query string in code, encode each value separately rather than the finished URL, or you will encode the & and = separators too and collapse all your parameters into one unreadable blob.

Spaces have two spellings and they are not interchangeable everywhere. %20 is correct in paths and is the safe general choice; the + shortcut for a space belongs to form-submitted query data. If a path breaks after encoding, a + where %20 belonged is a prime suspect. Lastly, remember that encoding is not encryption: anyone can decode your link, so never hide passwords or private tokens in a URL and call the encoding protection.

Frequently Asked Questions About URL Encoding

Which characters never need encoding?

Letters, digits and a small set of unreserved marks, hyphen, underscore, full stop and tilde, are always safe as they are. Structural characters such as / ? = and & also stay plain when they are doing their structural job.

Should I encode the whole URL or just parts of it?

For sharing a finished address that contains spaces or special characters in its names, encode the offending parts. When building links programmatically, encode each data value individually before assembling the URL, never the assembled whole.

What happens if I encode a URL twice?

The percent signs from the first pass get encoded themselves, so %20 becomes %2520, and one round of decoding at the server leaves broken % codes in your data. Encode exactly once.

Is %20 or + the right way to encode a space?

Use %20 in paths and as the general default. The + form is a legacy of HTML form submissions and is only reliably interpreted as a space inside query strings.

Does encoding change where the link goes?

No. Encoding changes the spelling, not the destination. A correctly encoded URL and its plain form, where the plain form is valid, identify the same resource.

Can encoding make a link private?

Not at all. Percent-encoding is a public, reversible spelling convention that anyone can undo in seconds. Secrets do not belong in URLs, encoded or not.

Why did my encoded link still break in an email?

Some email clients wrap long lines or reinterpret characters. Test the exact link from a sent message, and if a client keeps mangling it, shorten the underlying URL or link it behind anchor text instead of pasting it raw.

Links That Arrive Exactly as Sent

Most broken-link mysteries are really unencoded-character mysteries. Encode your data once, keep the structure clean, and the address your reader clicks will be the address you intended, spaces, ampersands, accents and all.