Developer Tools

URL Encoder

Encode text for safe use in URLs — converts spaces and special characters to percent-encoded equivalents. Free, instant, browser-based.

No uploads — browser onlyInstant result

Encoding mode

Plain Text Input

How to URL encode a string

  1. Choose your encoding mode — use encodeURIComponent for query parameter values, encodeURI for full URLs.
  2. Paste your plain text or URL into the input.
  3. Click Encode for URL to process.
  4. Copy the result to use in your code or browser.

When to URL encode

URL encoding is required whenever you include user input, file names, or text containing special characters in a URL. Spaces must become %20 (or +), and characters like &, =, and ? have special meaning in URLs and must be encoded in query values.

Privacy — your data stays local

All encoding and decoding runs in your browser using native JavaScript Web APIs. Nothing is sent to a server.

Frequently Asked Questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI is for encoding a full URL — it preserves characters like /, ?, &, and =. encodeURIComponent is for encoding a single value within a URL (e.g. a query parameter value) and encodes those structural characters too.

What does %20 mean?

%20 is the URL-encoded representation of a space character. You may also see + used for spaces in form data.

Can I encode an entire URL with this tool?

Yes — use the encodeURI mode for full URLs. Use encodeURIComponent only for individual values like query parameter strings.

Does it support Unicode characters?

Yes. Unicode characters are first UTF-8 encoded then percent-encoded, as per the URI specification.

Related tools