Skip to content
Toolars
Explore

URL Encoder / Decoder

Percent-encode query values or whole URIs and decode them strictly, across four modes that match how browsers split the job.

Local processing

Processing details

Tool inputs are processed on your device.

Resources may be downloaded to run this tool. Account services are separate.

Preparing offline use…

Privacy information
Report bug

Task path / input to outcome

How to encode and decode URLs

  1. 01

    Pick the right mode

    Choose Encode component or Decode component for one value such as a query parameter, or Encode URI and Decode URI for a complete address. The four modes sit in the tab bar and the field labels change to match, so the expected input is always clear before you paste.

  2. 02

    Paste the value

    Use the URL component field for a single value or the Complete URI field for a whole address. The result updates live as you type, and Load sample shows both a reserved-character example and a Unicode one so you can compare the two outputs quickly.

  3. 03

    Check the output rules

    Encode component applies encodeURIComponent: structural delimiters such as /, ?, &, and = become percent escapes, while letters, digits, and marks such as !, ~, *, apostrophes, and parentheses survive. Encode URI applies encodeURI, leaving URL structure such as :, /, ?, #, and = in place. Neither mode validates a complete URL; non-ASCII text becomes UTF-8 percent escapes and spaces become %20.

  4. 04

    Swap to round-trip

    Swap moves the output into the input with the reverse mode selected. Encode a parameter, swap, and decode again: if the restored text matches the original, the value survives transport exactly as written and is safe to embed in the real URL.

  5. 05

    Repair double-encoded values

    A value encoded twice shows literal %25 sequences — %25 is the escape for the percent sign itself. Decode once to undo the second layer; if the result still contains escapes, decode again with the matching mode until plain text or a clean address appears.

  6. 06

    Copy or download

    Copy result takes the output to the clipboard for a ticket or a config file, and Download .txt saves it as toolars-url-value.txt. Clear empties both panes when you are done.

Tool facts

Processing
In your browser
Input leaves this device
Never
Retention
Nothing is stored
Price
Free

Your input stays in the browser.

URL Encoder/Decoder uses its verified local execution path and does not create a hidden input or output history.

Local execution

Runs inside the current browser tab.

No hidden processing

Active tool data never becomes a Toolars document record.

No account required

Use the core workflow without creating a profile. Favorites sync to your account after you sign in.

Immediate reset

Clear the tab and the active working data is gone.

When URL Encoder/Decoder is useful

Pack a search term into a query parameter

Encode component on coffee & tea produces coffee%20%26%20tea, which can sit inside ?q= without breaking the query string. Paste it after the equals sign and the ampersand survives as data, not as a delimiter.

Read a percent-encoded address from a log

Paste the full escaped address into the Complete URI field and Decode URI to recover the readable URL with its structure intact. Component mode would also escape the : and / of the scheme, so match the mode to the value.

Fix a newsletter link that was encoded twice

Decode the broken link once to undo the second encoding layer, then check for remaining %25 sequences and decode again if needed. Finish by encoding only the individual parameter values, never the whole assembled URL.

What URL Encoder/Decoder actually does

An analytics dashboard link carries a campaign name with spaces and an ampersand, and one unencoded value breaks the whole query string; a redirect log is a wall of percent escapes that hides the destination you are actually auditing; a CMS exported a page slug twice and the link 404s. A free URL encoder online should solve those in seconds without sending the link anywhere. This URL encoder online runs all four modes in the browser — component encoding for individual values, URI encoding for complete addresses — with live output as you type and a Swap button that round-trips a value to prove it survives. It follows the same encodeURIComponent and encodeURI rules the browser itself applies, decodes strictly, and names the exact escape that fails instead of guessing. Developers reach for it when wiring query parameters by hand, reading server logs, or debugging redirects and UTM tags. Marketing parameters, internal hostnames, and unreleased campaign URLs stay on the device, which matters when a link embeds tokens or preview subdomains.

Common questions

What is the difference between component and URI modes?
Component mode is for one value, such as a query parameter: a&b becomes a%26b because & is encoded. URI mode preserves delimiters such as :, /, ?, #, and = in an entire address. These are JavaScript encodeURIComponent and encodeURI operations, not URL validators; component mode still leaves !, ~, *, apostrophes, and parentheses unchanged. Decode with the matching mode.
Which characters survive Encode component untouched?
Letters, digits, and a small set of marks — hyphens, underscores, periods, and a few others such as ! ~ * ' ( ) — stay as they are. Everything else, including spaces, slashes, ampersands, and equals signs, becomes a percent escape, which is exactly what a query-string value needs.
How are non-ASCII characters handled?
They are encoded as UTF-8 percent escapes, so 你好 becomes %E4%BD%A0%E5%A5%BD and accented characters take their UTF-8 byte sequences — the same encoding a browser applies when you type such an address into the address bar. Decoding reverses the process and rejects byte sequences that do not form valid text.
Why do I get "an incomplete or invalid percent escape"?
Decoding follows the browser's strict rules: every % must be followed by two hexadecimal digits, and the resulting bytes must form valid text. A trailing %, a sequence like %zz, or a truncated multibyte escape is rejected with that message instead of a garbled guess.
What happens if I decode a value that was never encoded?
Plain text without percent escapes passes through unchanged, so decoding is safe to try on any value. The error only appears when a % introduces an escape sequence that is incomplete or invalid.
What is double encoding and how do I fix it?
Double encoding happens when an already-encoded value is encoded again — common when a CMS or middleware processes a link that was pre-encoded by hand. The tell is %25, the escape for the percent sign itself. Decode once per layer: each Decode pass undoes one layer, and the strict decoder stops with a named error if a layer is corrupted rather than returning garbled text.
Should I encode the whole URL or only its parameters?
Only the parameter values, in almost every case. Run Encode component on each value, then assemble the URL with its structure — scheme, host, path, and the ? and & delimiters — untouched, or apply Encode URI to the complete address when it is already assembled. Encoding a complete URL in component mode escapes the structural delimiters and produces an address no server will route.
Is percent-encoding the same as URL encoding?
Yes — percent-encoding is the formal name from RFC 3986 for what is commonly called URL encoding or URI encoding. It replaces characters outside the unreserved set with a % followed by two hexadecimal digits, computed from the character's UTF-8 bytes, which is why non-ASCII text expands into several escapes.
Is the value I paste uploaded anywhere?
No. All four modes run entirely inside the current browser tab, the input is never sent or retained, and no account is required.

Related tasks, not a dead end.

Move into another focused workspace without returning to the full index.

URL Workbench

Clean URL lists with signed-link protection and per-line reasons. Compare components and export sitemaps.

Edit

JSON Explorer

Query JSONPath, extract fields and round-trip JSON Pointer records without losing large-number precision.

Inspect

JSON Schema Validator

Validate Draft 7 or 2020-12 locally with exact error paths; infer schemas from multiple observed samples.

Inspect

HTML Publishing

Clean pasted HTML for publishing while preserving lists, links and table semantics; preview changes safely.

Publish