Skip to main content
Toolsbase Logo

URL Encoder/Decoder

Encode and decode URL strings. Safely convert special characters in query parameters and paths.

Last updated:

How to Use

Expand how to use
  1. 1

    Enter text or URL

    Enter the string you want to encode, or the URL-encoded string you want to decode.

  2. 2

    Select mode and action

    Choose Component mode (for query parameters) or Full URL mode, then encode or decode.

  3. 3

    Copy the result

    Review the conversion result and click 'Copy' to copy to clipboard.

Mode:

Mode only affects encoding

Recommended for query values (encodes all special characters)

Input

0 characters

Output

Result will appear here

About URL Encoder/Decoder

URL Encoder/Decoder converts between plain text and percent-encoded URL format using the same rules as the browser's built-in encodeURIComponent and encodeURI functions. Special characters — spaces, ampersands, hash signs, non-ASCII text — must be percent-encoded before they can appear safely in query strings, path segments, or HTTP headers. Use Component mode for individual query parameter values (encodes everything including &, =, and +) and Full URL mode when working with complete URLs that must preserve the scheme and path delimiters. Essential for building OAuth redirect URIs, debugging curl or Postman requests with complex query strings, and decoding percent-encoded values from server access logs.

Key Features

  • Convert text to URL-encoded format
  • Decode URL-encoded format back to text
  • Component mode (equivalent to encodeURIComponent, for query parameters)
  • Full URL mode (equivalent to encodeURI, preserves scheme and delimiters)
  • Swap input/output feature for efficient sequential operations

Common Use Cases

  • Build an OAuth 2.0 redirect_uri parameter by percent-encoding the callback URL before appending it to the authorization endpoint query string
  • Encode a complex search query with spaces, quotes, and operators for use in a REST API request or Elasticsearch query URL
  • Decode percent-encoded values from Nginx or Apache access logs to read the original query strings and identify malformed requests
  • Encode a full redirect URL as a query parameter value in a login flow (e.g., '?next=https%3A%2F%2F...') and verify the double-encoding doesn't break the redirect
  • Quickly percent-encode special characters in a curl or HTTPie command before pasting it into a terminal to avoid shell interpretation issues

Frequently Asked Questions

What's the difference between Component and Full URL mode?

Component mode encodes all special characters including ":", "/", "?", "&", and "=". Use it for query parameter values. Full URL mode preserves URL-meaningful characters (scheme's ":", path's "/", etc.) and encodes everything else.

How are non-ASCII characters encoded?

Non-ASCII characters (including accented Latin letters, CJK characters, emoji, etc.) are first converted to UTF-8 byte sequences, then each byte is encoded as %XX (hex). This matches the behavior of JavaScript's encodeURIComponent() and is the standard expected by modern web APIs and RFC 3986.

Does space become "+" or "%20"?

This tool uses standard percent-encoding, so spaces become "%20". The "+" format is notation used in older form submissions (application/x-www-form-urlencoded).

What is double encoding?

Double encoding occurs when an already encoded string is encoded again. For example, "%20" becomes "%2520". This can cause issues if done unintentionally, so make sure to input the original text before encoding.

Is my input data sent to a server?

No. Encoding and decoding runs entirely in JavaScript using the browser's built-in encodeURIComponent and decodeURIComponent functions. Your strings are never transmitted anywhere.