Contents

A URL codec converts plain text to and from percent-encoded URL representations using UTF-8. Whether already encoded characters such as %2F stay encoded depends on whether the codec operates on a complete URL or on a single URL component, and on whether the operation is encoding or decoding. SyntaxBench’s URL encoder/decoder supports three modes—URL component, Complete URL, and Form value—each with distinct behavior for encoded delimiters, spaces, and reserved characters. This guide explains how each mode treats existing encoded characters and how to choose the right mode for your input.
URL component mode
URL component mode works on one piece of a URL at a time—such as a path segment, query key, or query value—rather than on an entire web address. During encoding, reserved delimiters such as &, =, /, ?, and # are converted into percent-encoded forms because they have structural meaning inside a full URL but should be treated as literal text inside a component.
If a component already contains a percent-encoded octet such as %2F, encoding leaves it unchanged rather than percent-encoding the % character again. Decoding reverses supported escapes back into their original characters while leaving unescaped literal text alone.
For example, if the input contains / and the tool encodes it, the output contains %2F; if the input already contains %2F, encoding preserves %2F. Decoding %2F produces /, while foo bar encodes as foo%20bar and decodes back to foo bar.
Because the mode treats each piece as an opaque string, it does not reassemble the pieces into a complete URL or check whether the resulting address is structurally valid. It transforms the supplied text according to the selected encoding or decoding operation only.
Readers should verify their exact input against the tool’s current output before using the result in a request, since behavior may differ between encoding and decoding and between component, complete URL, and form-value modes.
What to check before using encoded output
- Identify whether you are transforming a whole URL or only one component such as a query value.
- Confirm whether an existing
%2For similar sequence should stay encoded or be decoded before transmission. - Compare the tool’s output with the destination service’s expectations, especially for reserved characters such as
&,=,?,#, and/. - Treat encoded output as text until you know how the receiving server parses it.
Reader questions
- Does your input represent one query value or an entire web address?
- Are existing percent-encoded octets meant to remain encoded in the final request?
- Which reserved characters in your component could change meaning if decoded?
Complete URL mode
Complete URL mode applies encodeURI-style encoding and decodeURI-style decoding to an entire URL string. Because these operations are designed for whole URLs rather than isolated components, reserved structural characters such as : / ? # & = are generally left unchanged when they appear as literal characters.
During encoding, a literal forward slash stays as / because decodeURI-style parsing treats it as part of the URL structure. During decoding, an already encoded delimiter such as %2F remains encoded as %2F rather than being converted back into /. This means encoded delimiters are not automatically restored to their structural meaning simply because the whole string is being decoded.
Practical consequence: if your input contains %2F and you expect Complete URL mode to reveal the underlying slash, it will not do so. The encoded octet survives decoding. If you need that slash exposed, you would have to use a component-focused operation or handle the segment separately, understanding that doing so can change how a parser interprets the path.
Users should also know that this mode does not validate whether the input is a well-formed URL. It transforms text according to the selected encoding or decoding rule and returns the result, leaving malformed percent escapes and structural problems for the consumer of the output to detect.
Form value mode
Form value mode applies application/x-www-form-urlencoded rules to one field value at a time. During encoding, an ordinary space is converted to a plus sign (+), and a literal plus sign is converted to %2B so that a later decoder cannot mistake it for an encoded space. Reserved characters such as & and = are also encoded, matching component mode rather than leaving structural delimiters untouched as Complete URL mode does.
During decoding, %2B returns to a literal plus sign. The tool does not convert decoded plus signs back into spaces, because that plus-for-space substitution happens only while encoding. If a decoded result contains a plus sign, it remains a plus sign unless the reader separately knows that the original context intended it to represent a space.
Choose this mode when preparing a single form field value for submission. Do not use it to encode an entire URL, because it will encode characters such as : / ? # that have structural meaning in a complete web address. Before pasting output into a form, confirm the expected character limit and whether the receiving system accepts percent-encoded or form-urlencoded values.
Input, output, and decisions
The workflow starts by choosing a mode before entering any text. URL component mode is intended for individual path segments, query keys, or query values, including reserved delimiters such as & = / ? #. Complete URL mode is intended for an entire URL, where encodeURI-style behavior preserves reserved URL delimiters and leaves encoded delimiters such as %2F encoded during decoding. Form value mode is intended for application/x-www-form-urlencoded text, where a space becomes + and a literal plus becomes %2B during encoding.
After selecting a mode, enter the plain text or encoded string into the input field and trigger the transform. The tool only transforms text in the selected mode; it does not independently validate whether the result is a syntactically valid URL. Output appears as a single encoded or decoded string. Because encoded octets must represent UTF-8 encoded Unicode codepoints, and characters outside the allowed literal set must be percent encoded, malformed percent escapes are not silently ignored. When decoding produces an error, decoding does not leave the source untouched in the sense of preserving the original input unchanged—the result reflects the transform attempt or an error condition rather than silently returning the source.
To decide which mode to use, ask whether you are transforming one component or a complete address. Use URL component mode when the value is a segment, key, or value and delimiters should be encoded. Use Complete URL mode when the input is already a structured address and reserved delimiters must retain their structural meaning. Use Form value mode when the target is form data and spaces should map to plus signs.
Practical steps: select the mode, paste or type the input, run the transform, inspect the output, and re-run in another mode only if the encoding layer was wrong. Do not treat the output as proof that a destination will resolve or accept the request. For official behavior details, check SyntaxBench’s documentation or tool page directly.
Privacy and scope
The tool runs the conversion locally in the browser, so text is not uploaded to a remote server for encoding or decoding. No sign-in is required to use the URL component, Complete URL, or Form value mode. The documentation does not specify a maximum input size, so treat very long strings as untested until you verify behavior on the official page. Because the tool transforms only the text you supply in the selected mode, it does not validate whether the result is a well-formed URL or confirm that encoded octets represent valid UTF-8 codepoints. Check SyntaxBench’s official documentation if you need explicit size limits, data-handling statements, or supported browser requirements before pasting sensitive content.