url-encode · v1

URL Encode / Decode

Percent-encode or decode URLs and query parameters, with automatic direction detection.

Run now REST API / MCP Manifest

Sample input

https://example.com/搜索?q=你好 世界

API / MCP call

curl -X POST https://cn.toolkit.fun/api/v1/t/url-encode \
  -H "Authorization: Bearer tk_..." \
  -H "Content-Type: application/json" \
  -d '{"input":"...","params":{}}'

MCP server: https://cn.toolkit.fun/api/mcp

Usage and examples

Paste text and run with mode=encode or decode. scope=组件 encodes a single query parameter value; scope=整段 preserves separators in a full URL. Decoding treats + as a space. Invalid percent escapes report an error.

Example 1

Input
hello world&x=1
Parameters
{"mode":"encode","scope":"组件"}
Expected output
hello%20world%26x%3D1

Example 2

Input
hello%20world%26x%3D1
Parameters
{"mode":"decode"}
Expected output
hello world&x=1

Shortest path for an agent

Read the manifest first, then call the same run contract used by the web UI. The input, output, permissions, and receipt stay consistent across REST and MCP.

Manifest: https://cn.toolkit.fun/api/v1/registry/tools/url-encode/manifest
REST: POST https://cn.toolkit.fun/api/v1/t/url-encode
MCP: https://cn.toolkit.fun/api/mcp

Who it is for

Use this tool directly when you need URL Encode / Decode, want to chain it into a workflow, or want to expose it to an agent over REST API or MCP. This page carries the sample, call syntax, manifest, and version so search engines and generative retrieval can describe the tool accurately.

Notes

Percent-encode or decode URLs and query parameters, with automatic direction detection.

Frequently asked questions

What does URL Encode / Decode do?

Percent-encode or decode URLs and query parameters, with automatic direction detection.

How do I use URL Encode / Decode online?

Click “Open workbench” to open URL Encode / Decode, provide your input, and run the tool.

What input and output does URL Encode / Decode use?

Declared input type: text. Declared output type: text.