English

Online URL Encoder and Decoder for UTF-8 Text | FlyJson

Encode and decode URLs with Chinese, spaces, and special characters. Convert text to percent-encoded UTF-8, preview results, and copy the output instantly.

URL Encoder / Decoder

Encode or decode URL text instantly

Input

Output

Input characters: 0 · Output characters: 0

How to use

  • URL encoding: Converts text to percent-encoded form. For example, a space can be represented as %20.
  • URL decoding: Converts percent-encoded text back to readable text for inspection.
  • Character set: JavaScript encodeURIComponent and decodeURIComponent process text as UTF-8.
  • Automatic conversion: The output updates automatically when you type or switch modes.

What is URL encoding?

URL encoding converts characters that may be unsafe or ambiguous in a URL into percent-encoded bytes. Decoding reverses the conversion so the original text can be read. It helps browsers, servers, and APIs interpret URL components consistently.

Common characters and examples

  • A space is commonly encoded as %20.
  • The Chinese character 中 is encoded in UTF-8 as %E4%B8%AD.
  • Reserved characters such as &, =, ?, #, and / have special meaning in URLs.
  • HTML form encoding may represent a space as +; decodeURIComponent does not convert + to a space.

Encode a URL component

Use this tool for text that will be placed inside a URL path segment or query parameter. For example, encoding name=Sam & city=Shanghai produces name%3DSam%20%26%20city%3DShanghai. In most cases, encode parameter values rather than encoding the complete URL.

URL encoding is not encryption

Percent encoding only changes how text is represented. It does not hide or protect data. Do not use URL encoding to protect passwords, tokens, or other sensitive information. Avoid encoding the same text more than once, since a percent sign can become %25 and make the value difficult to interpret.

URL encoding and Base64

URL encoding handles characters in URL components. Base64 represents binary data as text. They solve different problems, and neither one encrypts data.

Frequently asked questions

What is the difference between URL encoding and decoding?

Encoding converts text and special characters to percent-encoded form. Decoding restores the readable text.

Why can decoding fail?

The input may contain an incomplete percent sequence, such as a % sign without two hexadecimal digits, or an invalid byte sequence.

Should I encode the entire URL?

Usually, encode only a path segment or query parameter value. Encoding the entire URL can make it unusable.

Does URL encoding encrypt content?

No. URL encoding is a reversible format conversion and must not be used to protect sensitive information.