Skip to content
Toolverse

URL Encoder/Decoder

Percent-encode text for safe use in URLs, or decode it back.

Loading tool…

How to use URL Encoder/Decoder

  1. Choose Encode or Decode.
  2. Choose Component mode for a single value (like a query parameter), or Full URL mode for an entire URL.
  3. Paste your text — the result updates instantly.

About this tool

The URL Encoder/Decoder converts text to and from percent-encoding (also called URL encoding). It offers two modes: Component, which escapes every character that isn't safe in a single URL segment or query parameter (spaces, &, =, ?, etc.) — use this for individual values; and Full URL, which leaves structural characters like :, /, ?, #, and & untouched and only encodes things like spaces — use this for encoding an entire URL. All processing runs instantly in your browser — nothing is uploaded or sent to a server.

Frequently Asked Questions

What's the difference between Component and Full URL mode?

Component mode (encodeURIComponent) escapes every character that isn't safe on its own, including &, =, ?, and /, so it's correct for encoding a single query parameter value. Full URL mode (encodeURI) leaves those structural characters alone since they're meaningful in a complete URL, and only encodes things like spaces and non-ASCII characters.

Why did decoding show a 'URI malformed' error?

This happens when the input contains a '%' that isn't followed by two valid hexadecimal digits, which isn't valid percent-encoding. Check for a stray '%' in your input, or a value that was already decoded and shouldn't be decoded again.

When would I use Component mode instead of encoding the whole URL?

Whenever you're building a URL by inserting a value into a query string or path segment — e.g. `?redirect=` + encoded value — so that characters in that value (like & or =) don't get misinterpreted as part of the URL's structure.