SEO Tools

URL Encoder

Percent-encode text for safe use in URLs, with separate modes for whole addresses and individual query values.

Free to use No registration Mobile friendly Unlimited usage

What is the URL Encoder?

URLs are allowed to contain a surprisingly small set of characters. Letters, digits, and a handful of symbols. Everything else - spaces, ampersands, question marks, accented letters, emoji - has to be percent-encoded, replaced by % followed by the hexadecimal value of each byte.

Skip that step and things break in ways that are hard to diagnose. A space truncates the URL at some servers. An unencoded ampersand splits one parameter into two. A hash symbol discards everything after it, because the browser reads it as the start of a fragment.

The two modes, and why choosing wrong matters

This is the part that catches people out, so it is worth being precise.

Component mode encodes aggressively. It escapes &, =, ?, /, #, + and : along with everything else. Use it for a single value that is going inside a URL - a search term, a redirect target, a name in a path segment. The whole point is that a slash or an ampersand in your value must not be mistaken for URL structure.

Full URL mode is gentler. It leaves the characters that give a URL its shape - the slashes between path segments, the question mark before the query, the ampersands between parameters - and encodes only what is genuinely unsafe. Use it when you have a complete address containing a space or an accent and you want to make it valid without dismantling it.

Getting this backwards is a common source of bugs. Encode a whole URL in component mode and you get a single unusable string with every slash escaped. Encode a redirect parameter in full URL mode and its internal query string leaks into the outer one, which is how open-redirect bugs and broken tracking links happen.

Spaces: %20 or plus?

Both appear, and they come from different specifications. %20 is the general percent-encoding for a space and is valid anywhere in a URL. The plus sign means a space only in application/x-www-form-urlencoded data - the format an HTML form uses when it submits by GET.

In practice: use %20 in a path, and either in a query string. Never use a plus in a path segment, where it is a literal plus and not a space. The optional plus setting here is for matching the output of a form-encoded system you are integrating with.

Line-by-line mode

The each-line option encodes every line separately, which is how you prepare a list of search terms for a batch of URLs or a column of values for a spreadsheet formula. Without it, the line breaks themselves would be encoded as %0A and the whole list would come back as one string.

Everything runs locally. Redirect targets and query values often contain tokens and account identifiers, and there is no reason for those to be transmitted to a third party just to add some percent signs.

Benefits of using the URL Encoder

Two modes, clearly separated

Component mode for a single value, full URL mode for a whole address - the distinction that causes most encoding bugs.

Prevents parameter injection

Encoding a redirect target properly stops its internal ampersands from leaking into the outer query string.

Plus or %20 for spaces

Match whichever convention the system you are integrating with expects, rather than guessing.

Batch encoding

Line-by-line mode prepares a whole column of search terms or values in one pass.

How to use the tool

Step 1

Choose component mode for a single value, or full URL mode for a complete address

Step 2

Paste the text you need encoded

Step 3

Turn on plus signs for spaces only if you are matching a form-encoded system

Step 4

Press Encode URL and copy the result

Popular use cases

  • Query string parameters
  • Redirect target URLs
  • Search terms in links
  • UTM tracking parameters
  • API request parameters
  • Filenames in download links
  • Non-Latin text in addresses
  • Deep links in mobile apps

Frequently asked questions

Component mode when you are encoding one value that will sit inside a URL - a search term, a redirect target, a name. Full URL mode when you already have a complete address and just need to make it valid. The test: if the text contains slashes that are meant to stay slashes, use full URL mode.

Browsers will display them and often handle them for you, but they are percent-encoded the moment the link is copied or passed between systems. Encoding them yourself makes the behaviour predictable rather than dependent on which client touches the link.

Ready to start using TU Web Tools?

Free, browser based utilities for developers, SEO professionals, students and businesses.

Free to use  •  Mobile friendly  •  No installation required