Advertisement

URL Encoder / Decoder

Encode and decode URL strings

Advertisement

About the URL Encoder / Decoder

Percent-encoding is how text travels safely inside a URL — spaces become %20, ampersands become %26, and so on. This URL Encoder converts any text to its percent-encoded form and decodes it back, with an auto-detect mode that picks the right direction for you.

Developers use it constantly: encoding a value before dropping it into a query string, or decoding an encoded parameter to read what it contains. It works on any text, not just full URLs, and shows live character counts for input and output so you can see how encoding expands a string.

How to Use the URL Encoder / Decoder

  1. Choose Encode, Decode, or Auto-detect.
  2. Enter the text or value you want to convert.
  3. In Encode or Decode mode, click Process; in Auto-detect, the output updates as you type.
  4. Copy the result, using the character counts to confirm the change.

Why Use ToolForge’s URL Encoder / Decoder

  • Auto-detect mode recognizes whether your input is already encoded and converts the right way automatically.
  • It uses encodeURIComponent and decodeURIComponent, so it correctly handles the full set of characters that need escaping, including non-ASCII.
  • Live character counters for input and output show how much encoding changes the length.
  • It runs entirely client-side, so the text you paste is never transmitted.

Frequently Asked Questions

What is URL encoding?

URL encoding, or percent-encoding, replaces characters that are unsafe or reserved in a URL with a percent sign followed by their hexadecimal code — a space becomes %20. This lets arbitrary text, including spaces and symbols, sit safely inside a web address.

What is the difference between encoding the whole URL and just a value?

Encoding a complete URL must preserve its structure (the slashes and colons), while encoding a single value escapes everything. This tool uses component-style encoding, which is right for individual query values; encoding an entire URL this way would escape the separators too.

When should I use auto-detect?

Use it when you are not sure whether a string is already encoded. The tool checks for percent-codes and decodes if it finds them, or encodes if it does not — handy for quickly flipping a value either way.

Why did my text get longer after encoding?

Each special character is replaced by a percent sign and two hex digits, so a single space becomes three characters (%20). Text with many spaces or symbols expands noticeably, which the live character counters let you see at a glance.

Related Tools

Advertisement
Buy Me a Coffee