URL Encode/Decode

Direction
Resulthello%20world%20%26%20foo%3Dbar

The URL Encode/Decode tool converts text to and from percent-encoding, the scheme that lets URLs carry characters that are otherwise unsafe or reserved. Encoding turns spaces, ampersands, question marks, and non-ASCII characters into %XX byte sequences; decoding reverses the process. It is the everyday utility for building or reading query strings, API parameters, and shareable links.

How it works

  1. Paste your text and choose a direction: Encode to make a string URL-safe, or Decode to turn a percent-encoded string back into readable text.
  2. Encoding uses JavaScript’s encodeURIComponent, which escapes reserved and special characters (space becomes %20, & becomes %26, ? becomes %3F) while leaving unreserved characters untouched.
  3. Decoding uses decodeURIComponent; if the input contains a malformed percent sequence, the tool reports that the input is invalid instead of returning garbled output.

Worked examples

Encode the phrase "hello world & friends?" for use in a URL.

  1. The space becomes %20, the ampersand becomes %26, and the question mark becomes %3F.
  2. Unreserved letters stay as they are.

hello%20world%20%26%20friends%3F

Decode the query value name%3Djohn%26age%3D30 back to readable text.

  1. Each %3D becomes = and each %26 becomes &.
  2. The remaining characters are already literal.

name=john&age=30

Frequently asked questions

What is percent-encoding?
It is the URL escaping scheme defined by RFC 3986. Characters that are reserved or unsafe in a URL are replaced by a percent sign followed by their two-digit hexadecimal byte value, such as %20 for a space.
When should I encode a value before putting it in a URL?
Encode any value that may contain spaces, ampersands, equals signs, slashes, or non-ASCII characters when you place it inside a query parameter, so it is not mistaken for URL structure.
Why does decoding sometimes fail?
Decoding fails when the input contains an incomplete or invalid percent sequence (for example a lone % not followed by two hex digits). The tool flags this rather than producing corrupt text.
Does it encode the whole URL or just a component?
It uses component-style encoding, which also escapes characters like & and = that separate URL parts. Use it on individual parameter values, not on an entire assembled URL.