All encoding and decoding runs locally in your browser. No data is sent to any server.
Switch between encodeURIComponent (for parameters) and encodeURI (for full URLs) with one click.
Results update instantly as you type — no need to click a button for every change.
Correctly handles multi-byte characters: Chinese, Japanese, Korean, Arabic, emoji, and more.
Automatically detects whether input is encoded or plain text and converts accordingly.
Quickly swap encoded and decoded text with the Swap button for bidirectional workflow.
Choose encodeURIComponent for URL parameters or encodeURI for complete URLs. The default mode handles most use cases.
Paste a URL, query string, or any text with special characters into the input area. The tool auto-detects if decoding is needed.
Click the Encode button to percent-encode, or Decode to convert percent-encoded strings back to readable text.
Click Copy to copy the output to your clipboard. Use Swap to quickly reverse the operation.
| Character | encodeURI | encodeURIComponent | Notes |
|---|---|---|---|
| Space ( ) | %20 | %20 | Both encode spaces |
| Slash (/) | / (kept) | %2F | URI preserves path separators |
| Colon (:) | : (kept) | %3A | URI preserves protocol separator |
| Question (?) | ? (kept) | %3F | URI preserves query delimiter |
| Ampersand (&) | & (kept) | %26 | URI preserves param separator |
| Equals (=) | = (kept) | %3D | URI preserves key-value delimiter |
| Hash (#) | # (kept) | %23 | URI preserves fragment identifier |
| Chinese (中) | %E4%B8%AD | %E4%B8%AD | Both encode non-ASCII to UTF-8 bytes |
Encode and decode URLs online free with FreeToolBox — instantly convert special characters in URLs to their percent-encoded equivalents and back. URL encoding (also known as percent-encoding, defined in RFC 3986) replaces characters not permitted in URLs with a % followed by two hexadecimal digits representing the character's byte value. This is essential for web developers building APIs, constructing query strings, handling form submissions, and debugging URL-related issues in any web application.
The tool provides two industry-standard encoding modes: encodeURIComponent for encoding individual URL parameters (encodes everything except unreserved characters A-Z, a-z, 0-9, -, _, ., ~), and encodeURI for encoding complete URLs while preserving structural delimiters like ://?#&=. It features real-time conversion as you type, automatic detection of encoded vs. plain input, full UTF-8 Unicode support for any language, and a convenient input/output swap function. All processing uses JavaScript's native functions running entirely in your browser — no data ever leaves your device. Completely free, instant, no account required.
encodeURI or whether an individual parameter needs encodeURIComponent.Use URL Encoder/Decoder when the issue is escaping characters for transport. If you are debugging a bigger API response or payload after decoding, continue with JSON Formatter. If your payload also includes encoded blobs or tokens, pair it with Base64 Encoder/Decoder.
No-upload workflow: internal links, signed parameters, and test URLs stay in your browser instead of being pasted into a third-party encoder.
Use encodeURI for a full URL that already includes separators like :// and ?a=1. Use encodeURIComponent for a single parameter value, path fragment, or user input that will be inserted into a URL.
URLs are restricted to a small set of unreserved characters. Spaces, and a range of symbols like "&", "=", "#", and non-ASCII text, would break how a URL is parsed, so they must be represented as percent-encoded sequences. That is why a space becomes %20 and a hash becomes %23. Encoding is only a representation — the server decodes it back to the original before using it. Understanding this helps you see why a URL you paste with symbols sometimes works and sometimes does not, depending on whether it was encoded.
There is an important distinction between encoding a whole URL and encoding only a query value. If you encode the entire path, you can break the separators that define the structure, like the slashes and the question mark. Usually you want to encode only the individual data values that pass into the URL, leaving the structural parts intact. When you build a URL from user input, encode each value separately rather than pasting the raw value into the string. This is the difference between a URL that works and one that silently breaks.
The most frequent error is decoding something that has already been encoded, which can mangle text, or not encoding something at all, which leaves the URL with characters it cannot carry. Another is treating space and "+" as the same thing; in a query string "+" often means a space, but in the rest of a URL it is a literal plus. When you decode, check the result in the context where it will be used, and remember that a displayed URL is not always the same as the underlying request the browser actually makes.