Skip to main content
SimpleToolbox

URL Encoder

URL encode text instantly. Free online URL encoder for query strings, path segments, and form data. No signup.

100% Local
Lightning Fast
Always Free

Found this helpful?

Share this free utility with your network.

What Is a URL Encoder?

URL encoding is a fundamental web development skill needed whenever user input or dynamic data is placed into URLs. Improperly encoded URLs cause broken links, security vulnerabilities (injection attacks), and data corruption. This encoder handles the full RFC 3986 specification, converting all reserved and unsafe characters to their percent-encoded equivalents while preserving safe characters.

Example

Text Input:

Hello World! Special chars: &foo=bar baz

URL-Encoded Output:

Hello%20World%21%20Special%20chars%3A%20%26foo%3Dbar%20baz

How to Use This Converter

  1. Paste your Text data into the input panel.
  2. View the converted URL-Encoded output — it updates instantly.
  3. Click Copy to copy the result to your clipboard.
  4. Verify the output matches your expectations before using in production.

Developer Tips

  • Spaces can be encoded as either %20 or + in URLs. The correct encoding depends on context: %20 in path segments, + in query string values. Using the wrong one causes 404s or garbled search results.
  • Do not encode the entire URL - only encode the values within query parameters. Encoding the ? and & that separate parameters breaks the URL structure. Most bugs come from encoding too much.
  • UTF-8 characters in URLs get percent-encoded as multi-byte sequences. A Japanese character becomes a 3-byte sequence. This is why URLs with non-Latin characters look so long.

Related Converters

All conversions run entirely in your browser — no data is sent to any server. For the specification, see RFC 3986 — URI Generic Syntax.

Frequently Asked Questions

What is URL encoding?

URL encoding (percent-encoding) replaces unsafe characters with a % sign followed by their hexadecimal ASCII value. Spaces become %20, ampersands become %26, and equals signs become %3D. This ensures special characters don't break URL structure.

When should I URL encode?

Encode user input before placing it in query strings, form submissions, or URL path segments. Any character that has special meaning in URLs (&, =, ?, #, /, spaces) must be encoded to be treated as literal data rather than URL structure.

What is the difference between encodeURI and encodeURIComponent?

encodeURI() encodes a full URI but preserves structural characters (:, /, ?, #, &). encodeURIComponent() encodes everything including those characters — use it for individual parameter values, not full URLs.

Should spaces be + or %20?

In query strings (application/x-www-form-urlencoded), spaces are encoded as +. In path segments and other URI components (RFC 3986), spaces are %20. Both are valid in their respective contexts.

Disclaimer

Results are calculated in your browser using standard formulas and are provided for reference only. For critical or high-stakes decisions, verify results with an authoritative source.

Free Tools Alert

Join 10,000+ creators. Get our newest productivity tools, templates, and calculators directly to your inbox every month.

No spam. One-click unsubscribe.