About this tool

Encode or decode URL-safe strings instantly.

URLs can only contain certain ASCII characters. Special characters like spaces, ampersands, slashes and non-ASCII Unicode letters must be percent-encoded before use in a URL. The URL Encoder converts any string to its percent-encoded form and decodes it back. Supports encodeURIComponent (encodes most special chars) and encodeURI (preserves URL structural chars) modes.

Example

Encode hello world & more=info!

hello%20world%20%26%20more%3Dinfo%21

Decode reverses this back to the original string.

How to use
  1. Paste the text or URL you want to encode.
  2. Click Encode to percent-encode special characters.
  3. Or paste a percent-encoded URL and click Decode.
  4. Copy the result.
Features
  • Percent-encoding and decoding
  • encodeURIComponent and encodeURI modes
  • Space encoded as %20 or + option
  • Handles Unicode (UTF-8)
  • Batch / multi-line mode
When to use this

Web developers manually constructing query strings for API calls that contain spaces, ampersands, or special characters.

Debugging HTTP 400 errors caused by improperly encoded query parameters — paste the raw URL to see what needs encoding.

Marketers building UTM-tagged URLs with campaign names that contain spaces (e.g. "summer sale 2024" → "summer%20sale%202024").

Backend developers encoding file names or user-supplied strings before appending them to URL paths.

Frequently Asked Questions
When do I need to URL-encode a string?+
Whenever including user input in a URL — for example a search query parameter, a redirect URL, or a path segment containing special characters.
What is the difference between encodeURI and encodeURIComponent?+
encodeURI encodes a complete URL, preserving structural characters like /, ?, &. encodeURIComponent encodes a value inside a URL — those structural characters are also encoded.
Is space encoded as %20 or +?+
In path segments use %20. In query strings both %20 and + are widely accepted; + (form encoding) is traditional. This tool defaults to %20 with a + option.
What characters are never encoded?+
Unreserved characters: A–Z, a–z, 0–9, -, _, ., ~. These are safe in any URL context.
What is the difference between encodeURI and encodeURIComponent?+
encodeURI encodes a full URL and leaves characters like / and ? intact. encodeURIComponent encodes a single component (like a query parameter value) and encodes those characters too. This tool uses component encoding.
Why does a space become %20 in URLs?+
URLs are ASCII-only. Space (ASCII 32) is encoded as its hex value: %20. Some older systems use + for spaces in query strings — both are valid in query position but %20 is preferred.
Can I decode a URL that has been encoded multiple times?+
Click Decode multiple times to peel off each layer of encoding. Double-encoding produces strings like %2520 (the % itself was encoded to %25).

URL Encoder / Decoder

← All tools
Loading…
Related tools
Base64 Encode / Decode JSON Formatter Regex Tester
Also available in: 🇪🇸 Español🇮🇳 हिन्दी