Form URL Encoder and Decoder
This page opens Form and Decode for one application/x-www-form-urlencoded field value. A plus becomes a space, while %2B becomes a literal plus. Type in the Decoded box or select Encode to prepare a field value for submission; the tool keeps the distinction between a space and a typed plus.
Decoding as a Form field: a plus becomes a space, and %2B becomes the plus that was typed into the form.
Type in either box: editing the encoded side decodes, editing the decoded side encodes. Swap sends the text you have to the other box, which is the fix for a paste that went in the wrong one. Positions in an error message count characters from the start of the box, beginning at 1.
Common questions
- Why does a+b decode to a b in Form mode?
- Form submissions write spaces as plus signs. A literal plus must be %2B, so a%2Bb decodes to a+b. Component and Full URI treat + as a literal plus instead. Select the rule used by the input rather than guessing from its characters.
- Does this parse an entire form body or submit a form?
- No. It converts one supplied field value. A complete body has key/value pairs joined by & and =, which must be separated before values are decoded. This tool does not parse those pairs, create JSON, submit a request or contact a URL.
- Which characters differ from Component mode?
- Form encoding keeps ASCII letters, digits, *, -, . and _, writes spaces as +, and percent-encodes other bytes. For example ! and ~ are escaped here. A typed plus becomes %2B. These rules are checked against the browser's URLSearchParams serializer.
Exact, and the mode decides the answer. Component mode escapes the characters that separate the parts of a URL, which is what a query value needs; full URI mode leaves them alone so a whole address survives a round trip; form mode treats a plus as a space, which is right for form submissions and wrong everywhere else.