Valn Tools

URL Encode & Decode

Percent-encode text for URLs or decode %XX sequences back to text. Supports full URLs and form-style + spaces.

Runs in your browser
1 line · 58 bytes

How to use

Choose Encode to percent-encode text for use in a URL, or Decode to turn %XX sequences back into readable text. The result updates as you type.

Component or full URL?

By default every reserved character is encoded, which is what you want for a single query value or path segment (encodeURIComponent). Turn on "Full URL" to encode a complete address while keeping its structure characters such as : / ? & = (encodeURI).

When should spaces be +?

HTML forms submit data as application/x-www-form-urlencoded, where a space is written as +. Turn on "Spaces as +" to produce or read that format. Elsewhere in URLs a space is %20.