tools/encode/url encoder
// encodenew

url encoder

percent-encode and decode url components

— paste text to start // client-only
// encoded/decoded output appears here

              curl -sX POST 'https://api.whittly.dev/v1/url/encode' \
  -H 'Authorization: Bearer $WHITTLY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"input":"https://ex.com/hello world?q=a b"}'
            

              const res = await fetch('https://api.whittly.dev/v1/url/encode', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ input: "https://ex.com/hello world?q=a b" }),
});
const data = await res.json();
            

              const { data } = await axios.post(
  'https://api.whittly.dev/v1/url/encode',
  { input: "https://ex.com/hello world?q=a b" },
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
            
// probulk URL encodingpro·files over 5 MBproupgrade →

// about this tool

URLs may only contain a limited set of ASCII characters. Percent-encoding (URL encoding) replaces unsafe characters with a % followed by two hex digits. This tool encodes and decodes individual URL components or full URLs.

// when to use

  • Encode query parameter values that contain special characters
  • Decode an encoded URL to read what it contains
  • Encode a URL before including it as a value in another URL
  • Fix "invalid URL" errors caused by unencoded spaces or brackets

// faq

What is the difference between encodeURI and encodeURIComponent?
encodeURIComponent encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use it for individual parameter values. encodeURI preserves characters that have meaning in a URL (/, ?, #, &, =) — use it for full URLs.
Why does a space become %20 sometimes and + other times?
%20 is the standard percent-encoding for a space in any part of a URL. The + encoding for spaces is specific to the application/x-www-form-urlencoded format used in HTML forms.
// history
Pro Cloud Sync — upgrade
no operations yet