A query parameter value
Encode user-visible search text without letting & or = create new parameters.
Encode the value only, then assemble it with URLSearchParams or the destination's URL builder.
Percent-encode URL components or decode percent-encoded text, with samples, swapping, copying, and text download.
Content last reviewed
0 characters · 0 words
Encoding uses encodeURIComponent— the right choice for query-string values. It converts unsafe characters to %-sequences (space → %20, & → %26) so they travel safely inside a link.
Overview
This page calls encodeURIComponent or decodeURIComponent over the entire input. That is the right operation for a query value, path segment, or fragment value whose delimiters must become data, and the wrong operation for a complete URL whose delimiters must remain structural.
Reserved delimiters inside the input become percent sequences rather than splitting a query or fragment.
Encode and Decode share one split view, with Swap available after a valid result.
Malformed percent sequences are surfaced as an error instead of being silently altered.
Export encoded-url.txt or decoded-url.txt from the current result.
How it works
Three steps, in the order the tool above actually takes them.
Separate the value from the URL structure before encoding it.
Paste the component, choose the direction, and inspect spaces, delimiters, and Unicode.
Put the result into the intended path, query, or fragment and let the destination parse the full URL.
Use cases
The jobs this page is usually opened for, and the setting that makes each one quick.
Encode user-visible search text without letting & or = create new parameters.
Encode the value only, then assemble it with URLSearchParams or the destination's URL builder.
Protect slashes, spaces, and Unicode that belong inside one path segment.
Do not encode the separators between path segments unless they are actually data.
Decode percent sequences to see the text an application should receive.
A plus sign is not converted to a space here; that convention belongs to form encoding.
Structure and data need different treatment
The same characters that make a URL work can corrupt a value when they appear inside that value. The correct boundary is therefore the component, not the finished link.
| Input scope | Tempting action | Correct handling |
|---|---|---|
| Complete URL | Encode the whole address with this page. | Keep : / ? & = and # structural; encode the individual values placed between them. |
| Query value | Leave & and = readable inside the value. | Encode them so they cannot split or create parameters. |
| Space | %20 and + are interchangeable everywhere. | This tool uses %20; + as a space is specific to form-style query encoding. |
| Security context | Percent-encoding makes the value safe for HTML, SQL, or a shell. | Each destination needs its own validation and output encoding after URL parsing. |
Encode the whole address with this page.
Keep : / ? & = and # structural; encode the individual values placed between them.
Leave & and = readable inside the value.
Encode them so they cannot split or create parameters.
%20 and + are interchangeable everywhere.
This tool uses %20; + as a space is specific to form-style query encoding.
Percent-encoding makes the value safe for HTML, SQL, or a shell.
Each destination needs its own validation and output encoding after URL parsing.
Privacy
The component value and result remain local and are not autosaved. Copy and download are explicit browser actions.
Encoding, parsing, formatting, generation, comparison, and cryptographic operations run in browser code. Form values and uploaded text files are not sent to a processing API.
Code, tokens, secrets, URLs, and generated outputs stay in component memory until the page reloads or closes. Split-pane tools remember only the divider percentage for the current tab session.
The page reads the clipboard only after a Paste action and writes it only after Copy. A local download is created only when you choose the tool's download control.
The page shell can send the tool slug, never the editor contents or filename. The endpoint is rate-limited using a transient requesting address and is skipped for Do Not Track or Global Privacy Control.
More detail in how processing works and our privacy policy.
Limits
The values this tool actually enforces, not a rounded-up version.
This tool encodes a single component. It cannot take a full URL and escape only the parts that need it, because deciding which ? is a delimiter and which is data requires knowing the intended structure. It also emits %20 for spaces rather than +, so it is not a form-body encoder.
FAQ
The ones that actually come up.
Guides