URL Encoder / Decoder

Encode text for a URL component or decode percent-encoded text. The tool does not claim that encoding an entire URL and encoding one query value are interchangeable.

Browser-localFreeNo upload required

Tool workspace

What this tool is for

Encode text for a URL component or decode percent-encoded text. The tool does not claim that encoding an entire URL and encoding one query value are interchangeable.

How to use

  1. Choose Encode when preparing a path or query component, or Decode when inspecting encoded text.
  2. Paste only the component you intend to transform unless you have reviewed the full URL behavior.
  3. Inspect reserved characters such as `/`, `?`, `&`, `=`, and `#` before copying the result.

Example

Encode `summer sale & clearance` for one query value, then decode it to confirm the original spaces and ampersand return.

FAQ

Should I encode a complete URL?

Usually encode individual components. Encoding the complete URL can also encode structural separators.

Why does a plus sign remain different from `%20`?

This tool uses URL component encoding; HTML form encoding has additional plus-for-space conventions.

Reproducible examples

Known inputs and expected results

Run these examples in the workspace above and compare the result with the documented output.

Encode a query value

Input
summer sale & clearance
Options
Choose component Encode.
Action
Encode the value before assigning it to one query parameter.
Expected output
summer%20sale%20%26%20clearance
Explanation
The ampersand is encoded as data instead of becoming another query separator.

Unicode round trip

Input
你好
Options
Encode, then decode the generated component.
Action
Run both directions.
Expected output
%E4%BD%A0%E5%A5%BD, which decodes back to 你好.
Explanation
encodeURIComponent operates on the UTF-8 representation of the Unicode text.

Error or unsupported case

Incomplete percent escape

Input
%E4%BD%A0%E5
Expected error or limit
decodeURIComponent reports a malformed URI sequence.
Safer alternative
Recover the complete encoded bytes or use the source text; do not guess missing escapes.

When not to use this tool

  • Encoding an entire URL as if it were one component
  • application/x-www-form-urlencoded plus-to-space semantics

Algorithm and assumptions

The implementation follows encodeURIComponent/decodeURIComponent semantics, keeps URL structure separate from component data, and does not translate plus signs to spaces.

Input and output

Input is plain or percent-encoded text. Output is transformed with JavaScript URL component rules.

Supported formats and behavior

  • UTF-8 percent encoding
  • Reserved-character inspection
  • Readable errors for malformed percent sequences

Limits

  • Not a URL validator
  • Does not submit or fetch the resulting URL

Edge cases and common errors

  • A literal percent sign must be encoded
  • Malformed `%` sequences cannot be decoded
  • Unicode becomes one or more UTF-8 byte escapes

Release testing

Release checks cover spaces, ampersands, slashes, Unicode, literal percent signs, malformed sequences, round trips, copy, and clear.

Privacy boundary

The input and result stay in this browser session. ZZP Box does not upload or store the values entered in this tool.

Related reviewed tools

Choose the next tool by the operation you need, then review that page's stated input and limits.