Choose the encoding context
The URL encoder opens with an empty current editor and component context. Paste one value, or select URI for whole-address rules. Form treats a=1&b=2 as one value, without splitting fields.
Encoding and escaping
Encode and decode in one editor, with the original and undo history available.
Encode: text → percent encoding; Decode: percent encoding → text. Each decode handles one layer. Context changes apply to the next action; a failed conversion keeps the content.
Enter text or load an example. Empty input converts to empty output.
0 UTF-16 units
Uses encodeURIComponent character rules. Spaces become %20; + becomes %2B. Decoding keeps a literal +.
UTF-8 only, one decode pass. Decoding rejects malformed percent escapes and invalid UTF-8. Both directions reject isolated UTF-16 surrogates. Form decoding is strict, unlike permissive URLSearchParams parsing.
Initial input: up to 1,048,576 UTF-16 units. Output and further processing of generated documents: up to 4,194,304 units. Empty input is valid; pasting may normalize line endings.
Conversion stays in this browser. Input is not uploaded and URLs are not visited. Undo history stays in this tab and is bounded for large documents.
Use this URL encoder to prepare a query value, inspect a copied address or decode a form field. Choose the context before converting: the same ampersand, slash or plus sign can have a different role in each context.
The URL decoder reads UTF-8 percent encoding once. It leaves every result as plain text, so an address, fragment or script-shaped string can be inspected without visiting or executing it.
The URL encoder distinguishes a single component, a complete URI and one form field value. Component mode escapes delimiters; URI mode preserves structure; form encoding uses + for spaces. Choosing deliberately avoids turning an ampersand in a value into a separator.
Malformed % escapes and invalid UTF-8 produce a source line and column, with the error line highlighted. The URL encoder does not silently substitute replacement characters or export a partially decoded value.
The URL encoder opens with an empty current editor and component context. Paste one value, or select URI for whole-address rules. Form treats a=1&b=2 as one value, without splitting fields.
Encode and Decode read the current content. Editing or changing context never runs conversion automatically. Ctrl/Cmd+Enter encodes; Ctrl/Cmd+Shift+Enter decodes. Empty input is valid.
The original is kept before the first transformation. Edits, conversions, examples and clearing share Undo and Redo; context selection stays unchanged by history. Copy and TXT download use the complete current content.
Component encoding follows encodeURIComponent: ASCII letters, digits and -_.!~*'() remain unchanged. Spaces become %20, ampersands %26 and slashes %2F. Percent signs are encoded again as %25.
Full URI encoding also preserves ;/?:@&=+$,#. URI decoding leaves their escaped forms intact, including hex letter case: %2f stays %2f. It does not parse, validate or repair the address.
For one form value, ASCII letters, digits and *-._ remain unchanged. A space becomes + and a plus sign becomes %2B. Decoding %2B produces a literal plus, without converting that result into a space.
Non-ASCII characters become their UTF-8 bytes, including accented letters and emoji. Error positions use one-based lines and UTF-16 columns. Invalid multi-byte sequences are reported at the starting percent sign.
Both can represent a space in the appropriate context. Component and URI encoding use %20. Form encoding uses +, and only form decoding interprets an original + as a space. A literal plus is encoded as %2B in a component or form value.
A malformed %HH escape or invalid UTF-8 sequence fails strict decoding. Check the indicated source line and column. Isolated UTF-16 surrogates also fail under this tool’s source-text policy; no partially decoded result can be exported.
Choose component mode for one query value or path segment. Choose URI mode when structural separators should remain. URI mode cannot infer whether an ampersand is a separator or part of a value, so encode individual values before assembling an address.
It commonly indicates an extra encoding layer: % became %25, leaving 20 after it. One decode turns %2520 into %20. Decode again only when the receiving format requires that second step.
Conversion runs in this browser and does not upload the input. Pasted addresses are handled as text and are not visited. You can copy the current result or save it as a TXT file.
Found a percent-encoding edge case?
Choose a context, encode or decode repeatedly in one editor, then copy or download the complete current content.