Developer tools

URL Encoder
Decoder

URL encode text into percent escapes, or URL decode %20-style escapes back to text. It runs in your browser.

Conversion settings

Component mode encodes separators such as /, ? and &. Spaces become %20.

Choose an operation and mode, then convert your text.

Each run converts once. Empty text is valid. URLs are treated as text: this tool never opens or visits them.

Choose the right encoding mode

The same characters have different jobs in a URL and in a single value.

URL component

For a single query value or path segment. Uses encodeURIComponent and decodeURIComponent. Separators are escaped; decoding restores them. Literal + stays + when decoding.

café & tea → caf%C3%A9%20%26%20tea

Whole URI

Uses encodeURI and decodeURI. Keeps URI separators when encoding and preserves their escapes when decoding, so %2F stays %2F. It does not validate a URL or escape & inside an individual query value.

https://example.com/a b?q=tea → https://example.com/a%20b?q=tea

Form value

For one application/x-www-form-urlencoded name or value, not a full query string. Spaces become +; literal + becomes %2B. Decoding changes + to space and strictly decodes UTF-8 escapes.

café + tea → caf%C3%A9+%2B+tea

How to encode or decode a URL

  1. Choose operation and mode

    Select encode or decode, then choose one component, a whole URI or one form value.

  2. Enter your text

    Paste into Input text and run the conversion. Nothing is trimmed and there is no fixed text-length limit.

  3. Use the result

    Copy or download a UTF-8 text file. Use as input moves the result back for another run; it does not automatically convert again.

Frequently asked questions

What is URL encoding?

URL encoding, also called percent encoding, writes a character that is not allowed or has a special job in a URL as a % sign and two hex digits for each UTF-8 byte. A space becomes %20, & becomes %26 and é becomes %C3%A9. URL decoding turns those escapes back into the original characters.

Why do + and %20 behave differently?

All modes decode %20 as a space. Only form-value mode also treats a literal + as a space. In component and whole URI modes a literal + remains a plus. Choose the mode that matches the original encoding.

What happens to malformed percent escapes?

Decoding rejects incomplete or non-hexadecimal escapes such as %2 and %ZZ, and invalid UTF-8 such as %FF. It returns no partial result. Unicode text is supported; unpaired surrogate characters are rejected rather than silently replaced.

Does it decode repeatedly or normalize URLs?

No. Decoding %252F once produces %2F, not a slash. Encoding already escaped text escapes its percent signs again. This is a text codec, not a URL parser: it does not canonicalize hosts, convert domains to Punycode, check protocols or test destinations.

Which punctuation stays unescaped?

Component mode leaves letters, digits and - _ . ! ~ * ' ( ) unchanged. Whole URI also leaves ; , / ? : @ & = + $ # unchanged. Form-value encoding leaves only letters, digits and * - . _ unchanged and uses + for spaces.

How are line endings and downloads handled?

Browser text boxes normalize pasted line endings to LF. Decoded carriage returns may also display as LF. Unicode line and paragraph separators appear as line breaks in Result. Copy result and the UTF-8 download retain the exact decoded text. No byte-order mark is added. Use as input keeps the original separators but normalizes CR and CRLF to LF through the input text box. Decoding can produce invisible control characters; the output is always plain text.

Can I cancel or change the input?

Cancel stops processing and keeps your input. Editing text or changing a setting clears the old result and cancels pending work. Large text is limited by browser memory; processing failures show an error and you can retry. Clipboard access may require browser permission. If access fails, the result is selected for browser copying, which may change line breaks or control characters. Download .txt keeps the original text.