DockittDockitt

URL Encoder & Decoder Online — Percent-Encode URLs

Encode and decode URLs online. Percent-encodes special characters for safe URL transmission. Free, browser-based.

Runs entirely in your browser — no data leaves your device
No account, no signup, completely free
Instant results — no waiting for server processing
Works offline once the page is loaded
Runs entirely in your browser. Your data never leaves your device — no server, complete privacy.

URLs can only contain a limited set of ASCII characters. Characters outside this set — including spaces, Unicode letters, and special characters like &, =, #, and ? — must be percent-encoded (e.g., a space becomes %20, & becomes %26). This tool percent-encodes any text for use in URLs, or decodes percent-encoded strings back to readable text. It uses encodeURIComponent / decodeURIComponent, which encode all characters except A-Z, a-z, 0-9, -, _, ., and ~.

How to use

  1. Paste the text or URL you want to encode or decode into the input textarea.
  2. Click 'Encode' to percent-encode the text, or 'Decode' to convert percent-encoded text back to readable form.
  3. Copy the result from the output textarea. The character counts are shown below.

FAQ

What characters are percent-encoded?

encodeURIComponent (used by this tool) encodes everything except: A-Z, a-z, 0-9, hyphen (-), underscore (_), dot (.), and tilde (~). All other characters — including spaces, !, @, #, $, &, *, (, ), +, ,, /, :, ;, =, ?, @, [, ], and all non-ASCII Unicode characters — are percent-encoded as their UTF-8 byte values prefixed with %. For example, a space becomes %20, © becomes %C2%A9, and 中 becomes %E4%B8%AD.

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent encodes more characters and is intended for encoding individual components of a URL (a query parameter value, a path segment). encodeURI is more lenient and is intended for encoding a complete URL — it does not encode characters that are valid in a URL structure (:, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, =). For most use cases, encodeURIComponent is the correct choice, which is what this tool uses.

Why do I need to URL-encode text?

URLs must be transmitted as ASCII text with a restricted character set. If you include a URL parameter value that contains & or = (e.g., a search query), these characters would be misinterpreted as URL structure separators. URL-encoding converts them to safe representations: & becomes %26, = becomes %3D. Without encoding, a URL like ?q=foo&bar would be parsed as two parameters (q=foo and bar=), not one parameter with the value 'foo&bar'.

Can I decode a full URL?

Yes. Paste the entire URL (e.g., https://example.com/search?q=hello%20world&lang=en) and click Decode. The percent-encoded sequences are replaced with their decoded characters, making the URL human-readable. Note that decoding a URL and then re-encoding it may not produce the original URL exactly, because the decoded form may contain characters that get re-encoded differently.

What is the difference between %20 and + for spaces?

Both %20 and + represent a space in URLs, but in different contexts. %20 is the standard percent-encoding of a space character and is valid in any part of a URL. The + character represents a space only in the query string part of a URL, as per the application/x-www-form-urlencoded format used by HTML forms. encodeURIComponent always uses %20, not +. When decoding, this tool decodes both %20 and + as spaces to handle both conventions.

Is there a length limit on the input?

There is no hard limit. The encoding and decoding are pure JavaScript string operations that run in under a millisecond for typical inputs. Very long strings (millions of characters) will still be processed quickly, though the textarea may be slow to render at such sizes. Note that web servers and browsers impose limits on URL lengths (typically 2,048 to 8,192 characters), so encoded URLs that exceed these limits may not work in practice.