URL encode text

URL encode text and get a percent-escaped string safe for query strings and form bodies. By default the encoder uses encodeURIComponent, which escapes every reserved URL character while leaving A-Z a-z 0-9 - _ . ! ~ * ' ( ) alone. Multibyte characters are widened to UTF-8 first, so é becomes %C3%A9. Toggle Encode All to escape every byte.

Input
Line 1:1 LF cloud_done Saved locally
Result URL Encode
0 lines 0 chars

Percent-encoding for URL-safe transmission

URL encoding (also called percent-encoding) replaces unsafe bytes with %HH hex escapes so the result is safe to drop into a URL query string, form body, or path segment. Default mode here calls JavaScript's native encodeURIComponent, which preserves the unreserved set A-Z a-z 0-9 - _ . ! ~ * ' ( ) from RFC 3986 and escapes everything else. So 1+2=3 becomes 1%2B2%3D3 and https://example.com becomes https%3A%2F%2Fexample.com.

Non-ASCII characters are widened to UTF-8 bytes before escaping. café becomes caf%C3%A9, where %C3%A9 is the two-byte UTF-8 sequence for é. A single emoji like 🙂 produces four %HH escapes.

Toggle Encode All in the action bar to percent-encode every single byte, including the unreserved set. That mode is rarer but useful when a downstream consumer is overly strict, or when you want the output to be unambiguously a sequence of %HH tokens. URL encoding is a transport format, not security: anyone can paste the result into URL decode and read it.

How to use url encode text

  1. 1Paste or type your text into the input panel on the left.
  2. 2The percent-encoded result appears in the output panel on the right as you type.
  3. 3Toggle Encode All to escape every byte, including unreserved letters and digits.
  4. 4Click Copy in the output header to copy the encoded value.
  5. 5Paste the result into your URL query string, form body, or wherever you need a URL-safe value.

Keyboard shortcuts

Drive TextResult without touching the mouse.

Shortcut Action
Ctrl FOpen the find & replace panel inside the input Plus
Ctrl ZUndo the last input change
Ctrl Shift ZRedo
Ctrl Shift EnterToggle fullscreen focus on the editor Plus
EscClose find & replace, or exit fullscreen
Ctrl KOpen the command palette to jump to any tool Plus
Ctrl SSave current workflow draft Plus
Ctrl PRun a saved workflow Plus

What this tool actually does

Default mode follows RFC 3986 unreserved set

Default behaviour matches encodeURIComponent: A-Z a-z 0-9 - _ . ! ~ * ' ( ) pass through unchanged, every other byte is escaped as %HH. Reserved characters (:/?#[]@!$&'()*+,;=) get escaped because they have meaning inside URL components.

UTF-8 widening for non-ASCII text

Multibyte characters are converted to UTF-8 bytes before escaping. é -> %C3%A9, -> %E3%81%93, 🙂 -> %F0%9F%99%82. This matches encodeURIComponent in every modern browser and the quote helper in Python's urllib.parse.

Encode All toggle for every byte

Turn on Encode All to escape every byte, including the unreserved set. hello becomes %68%65%6C%6C%6F. Useful for strict consumers or for debugging where you want each byte visible as its own %HH token.

Hex pairs are uppercase

Output uses uppercase hex (%C3%A9, not %c3%a9). RFC 3986 recommends uppercase for percent-escapes; many servers accept either, but uppercase normalises the form.

Browser-side, no upload

Encoding runs through the native encodeURIComponent on each keystroke. No server round-trip, no log of what you pasted.

Worked example

The = escapes to %3D, the literal space escapes to %20, and each é escapes to its two-byte UTF-8 sequence %C3%A9.

Input
name=Café résumé
Output
name%3DCaf%C3%A9%20r%C3%A9sum%C3%A9

Settings reference

Behaviour Effect on output
Unreserved set in default mode A-Z a-z 0-9 - _ . ! ~ * ' ( ) pass through unchanged.
Reserved characters :/?#[]@$&'()*+,;= and the literal space escape to %HH.
Non-ASCII characters Widened to UTF-8 bytes first. Each byte becomes %HH.
Encode All Off by default. On escapes every byte, including unreserved letters and digits.
Hex case Always uppercase (%C3%A9). Matches RFC 3986 recommended form.
Spaces Always escape to %20. + is not used (that is the application/x-www-form-urlencoded variant, which this tool does not produce).
Already-encoded sequences Treated as plain text. %20 in the input becomes %2520 in the output (double-encoded).

FAQ

Does it encode spaces as + or %20?
Always %20. The +-for-space form is the application/x-www-form-urlencoded variant used in HTML form bodies. RFC 3986 percent-encoding (which this tool produces) uses %20. Most servers accept either inside a query string.
When should I turn on Encode All?
Almost never. Default mode is what every standard library and browser uses, and most servers expect. Turn Encode All on only when a downstream consumer is unusually strict, or when you want a debug view where every byte is visible as a %HH token.
Is URL encoding a form of encryption?
No. It is a transport format. Anyone can paste the result into URL decode and read the original. For a one-way digest use SHA-256.
Why does my pre-encoded URL come back double-escaped?
The encoder treats the input as plain text. If the input already contains %20, the % sign itself escapes to %25, producing %2520. To re-encode safely, run URL decode first to recover the original characters, then encode once.
Does it handle emoji and non-Latin scripts?
Yes. Each character is widened to UTF-8 bytes before escaping. こんにちは produces 15 %HH tokens (3 bytes per character), and a single emoji like 🙂 produces 4.