Theme: -
Font size:

URL Encoder - Percent-Encode URLs and Query Strings

Percent-encode URLs, query strings, and multi-line UTF-8 text with + space, RFC 3986, and URL structure options.

To percent-encode a list of multiple URLs line by line, switch to our Bulk URL Encoder.

🔒 Data Safety: We process everything securely and never store or share it.

Enter your URL or text:

How to Use

  1. Enter your URL, query string, or UTF-8 text in the input box above, or click "Sample".
  2. Select Encode Space as +, Strict RFC 3986, or Preserve URL Structure in the options below.
  3. Click the "Encode" button to merge line breaks and generate a single percent-encoded output string.
  4. Click "Copy" or "Download" above the output box to get your encoded URL string.

Options Explained

  • Encode Space as +: Converts spaces into + for application/x-www-form-urlencoded strings and encodes literal + as %2B (default uses %20).
  • Strict RFC 3986: Percent-encodes RFC 3986 sub-delimiters !, ', (, ), and * into %21, %27, %28, %29, and %2A.
  • Preserve URL Structure: Keeps URI structure delimiters (:/?&=#+@$,;) intact so full links stay valid while encoding spaces and UTF-8 text.

Key Features

  • Merge multi-line URLs and plain text into one continuous percent-encoded string with uppercase %XX hex tokens.
  • Convert spaces into + signs for application/x-www-form-urlencoded queries while encoding literal + characters as %2B.
  • Enforce strict RFC 3986 compliance by percent-encoding !, ', (, ), and * into %21 through %2A.
  • Preserve URI structure delimiters (:/?&=#+@$,;) to keep full HTTP and HTTPS links intact while escaping unsafe text.
  • Encode multi-byte UTF-8 characters for accented letters, CJK, Arabic, Cyrillic scripts, and 4-byte emojis like %F0%9F%9A%80.
  • Execute all URL percent-encoding locally in your browser memory with zero server data storage.

About This Online URL Encoder

This URL encoder converts plain UTF-8 text, query parameters, and wrapped multi-line inputs into RFC 3986 percent-encoded strings. It offers dedicated toggles for form + spaces, strict sub-delimiter escaping, and full URI structure preservation.

Developed and maintained by the PU Tools team, this tool gives you fast, accurate, safe, and easy results in just a few clicks.

Common Use Cases

  • Query String Serialization: Encode search terms, filter values, and symbols like &, =, and + for GET requests.
  • OAuth Redirect Links: Percent-encode full redirect_uri and callback URLs so nested query strings pass cleanly through authentication endpoints.
  • Internationalized URL Parameters: Convert accented letters, non-Latin scripts, and UTF-8 emojis into %XX hex bytes for REST APIs.

Example Input and Output

Example Input

https://example.com/?q=hello world&tag=C++ 🚀

Options used: Encode Space as +: OFF | Strict RFC 3986: OFF | Preserve URL Structure: OFF

Example Output

https%3A%2F%2Fexample.com%2F%3Fq%3Dhello%20world%26tag%3DC%2B%2B%20%F0%9F%9A%80

The encoder converts URL delimiters, spaces, plus signs, and UTF-8 emojis into uppercase %XX hex tokens.

URL Encoder Example
Screenshot: Actual output of the URL Encoder

Frequently Asked Questions

How does this URL encoder handle links or text split across multiple lines?

It strips CR, LF, and CRLF line breaks to merge wrapped lines into one continuous string. This prevents unwanted %0A or %0D newline tokens from breaking your encoded URL or query parameter.

When should I encode spaces as + instead of %20 in a URL?

Use + spaces for application/x-www-form-urlencoded form query strings and %20 for RFC 3986 URL paths. When enabled, the encoder converts literal + signs into %2B first so values like C++ stay intact.

Why does standard URL encoding leave !, ', (, ), and * unencoded?

Standard JavaScript encodeURIComponent follows legacy RFC 2396 rules and leaves those five punctuation symbols unescaped. Enable Strict RFC 3986 to encode them into %21 through %2A for OAuth 1.0a and AWS signatures.

What is the difference between default encoding and preserving URL structure?

Default mode encodes every reserved symbol so you can pass a full URL inside a query parameter. Preserving URL structure keeps delimiters (://, /, ?, &, =) intact while escaping spaces and UTF-8 text.

How does this tool percent-encode non-ASCII characters and UTF-8 emojis?

The tool converts each character into its UTF-8 byte sequence and formats every byte as %XX in uppercase. Accented Latin letters, CJK scripts, Arabic text, and 4-byte emojis like 🚀 (%F0%9F%9A%80) encode without data loss.

Does this URL encoder send my links or query strings to a server?

No, all percent-encoding runs locally inside your browser memory using client-side JavaScript. Your private URLs, API parameters, and query strings never leave your device or get stored anywhere.

What happens when I submit an empty input box in this URL encoder?

Encoding an empty string is valid and returns a blank output box with a status confirmation.